I have WCF service:
[OperationContract(Name = "GetAllEmployee")]
IList<Employee> GetEmployees(string UserId, string UserPassword);
In ServiceWeb.svc.cs file, I have this code:
public IList<Employee> GetEmployees(string UserId, string UserPassword)
{
List<Employee> E = new List<Employee>();
return E;
}
Now, when I add this WCF reference to the web project, it gets converted to using []:
public ServiceWeb.ServiceProWCFService.Employee[] GetAllEmployee(string UserId, string UserPassword)
{
ServicePROWeb.ServiceProWCFService.GetAllEmployeeRequest inValue
= new ServicePROWeb.ServiceProWCFService.GetAllEmployeeRequest();
inValue.UserId = UserId;
inValue.UserPassword = UserPassword;
ServicePROWeb.ServiceProWCFService.GetAllEmployeeResponse retVal =
((ServicePROWeb.ServiceProWCFService.IServiceProWCFService)(this))
.GetAllEmployee(inValue);
return retVal.GetAllEmployeeResult;
}
This is not correct. I tried to change in the advanced settings to make it as shown in this screenshot:
But it still didn’t change.
I have already tried these things:
-
Change the advanced setting of the configure reference to make System.Collection.Generic.List and reload the service again, but it didn’t work
-
Removed all the old references to the service and tried to do a generic list instead of an
IEnumerablelist for the return type.
Please suggest a better solution to handle this
