我收到错误
wcf测试客户端不支持此操作,因为它使用类型 catNameService.catNames []
Class和IClass代码:
catService 类:
namespace catNameService
{
class catService:IcatService
{
public IEnumerable<catNames> sortBySex(int genderNumber)
{
using (var context = new catNamingEntities())
{
return context.catNames.Where(t => t.Gender == genderNumber).ToList();
}
}
}
}
IcatService 界面:
namespace catNameService
{
[ServiceContract]
public interface IcatService
{
[OperationContract]
IEnumerable<catNames> sortBySex(int genderNumber);
}
}