How to Serialize property of type ICollection while using Entity Framework

后端 未结 5 909
离开以前
离开以前 2021-01-04 10:14

I have a class as shown below

public class Survey
    {
        public Survey()
        {
            SurveyResponses=new List();
              


        
5条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-04 10:30

    For me the issue was not having a default constructor. Example: List MyVar; // MyClass needs a public constructor

提交回复
热议问题