WCF/WF - error : Not all code path return a value
Asked By shoaib mansoori on 23-Feb-11 09:51 PM
My IService coding
[ServiceContract]
public interface IServiceCustomer
{
[OperationContract]
List<clsCustomer> getCustomer();
}
[DataContract]
public class clsCustomer
{
private string CustomerCode;
private string CustomerName;
[DataMember]
public string _CustomerCode
{
get { return CustomerCode; }
set { CustomerCode = value; }
}
[DataMember]
public string _CustomerName
{
get { return CustomerName; }
set { CustomerName = value; }
}
}
My Service1 coding
public class ServiceCustomer : IServiceCustomer
{
public List<clsCustomer> getCustomer()
{
List<clsCustomer> objcus = new List<clsCustomer>();
SqlConnection objcon = new SqlConnection();
objcon.Open();
}
}
on getcustomer i am facing error