有没有一种方法可以将SPMetal生成的类与WCF服务应用程序一起使用?
我使用序列化参数(设置为“单向”)用spmetal生成实体类。但是,当我使用这些类作为WCF方法的返回值时,会出现以下错误:有没有一种方法可以将SPMetal生成的类与WCF服务应用程序一起使用?,wcf,sharepoint-2010,linq-to-sharepoint,Wcf,Sharepoint 2010,Linq To Sharepoint,我使用序列化参数(设置为“单向”)用spmetal生成实体类。但是,当我使用这些类作为WCF方法的返回值时,会出现以下错误: System.ServiceModel.CommunicationException was unhandled by user code Message=The server did not provide a meaningful reply; this might be caused by a contract mismatch, a premature ses
System.ServiceModel.CommunicationException was unhandled by user code
Message=The server did not provide a meaningful reply;
this might be caused by a contract mismatch,
a premature session shutdown or an internal server error.
使用我自己的类是完美的。SPMetal创建的代码可在此处查看:
有人知道SPMetal和WCF是否配合得很好吗