WCF测试客户端(WCF + ENTITY DATA MODEL)不支持此操作

时间:2012-04-10 11:52:06

标签: wcf methods entity ado.net-entity-data-model wcftestclient

我收到错误

  

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);
     }
}

0 个答案:

没有答案