This is my code:
My service implementation .svc
public List<string> getClientes()
{
using (var context = new Model.CivarTransporteModelContainer())
{
return context.Cliente.Select(x => x.CLNombre).ToList();
}
}
My service interface .cs
[OperationContract]
List<string> getClientes();
Web application
if (Request.QueryString["getClientes"] != null)
{
CivarTransporteService.View.CatalogsService wsclient = new CivarTransporteService.View.CatalogsService();
List<CivarTransporteService.View.CatalogsService> clientList =wsclient.getClientes().ToList();
}
I'm having an error in the = wsclient.getClientes().toList();
part
Cannot implicitly convert type System.Collections.Generic.List<string> to System.Collections.Generic.List<CivarTransporteService.View.CatalogsService>