Cannot serialize parameter of type 'System.Linq.Enumerable… ' when using WCF, LINQ, JSON

后端 未结 3 724
暗喜
暗喜 2020-12-18 03:42

I have a WCF Service. It uses Linq-to-objects to select from a Dictionary. The object type is simple:

public class User 
{
   public Guid Id;
   public Stri         


        
3条回答
  •  感情败类
    2020-12-18 04:11

    No, one must return a concrete class from a web service. Make the return type List and be done with it.

提交回复
热议问题