Class Mapping Error: 'T' must be a non-abstract type with a public parameterless constructor

前端 未结 3 981
青春惊慌失措
青春惊慌失措 2020-12-01 03:06

While mapping class i am getting error \'T\' must be a non-abstract type with a public parameterless constructor in order to use it as parameter \'T\' in the generic type or

3条回答
  •  栀梦
    栀梦 (楼主)
    2020-12-01 03:48

    I had the same issue. I should have read the message before Googling it. I needed to add a parameterless constructor ... :-)

    public MyClass() {
      //stuff
    }
    

提交回复
热议问题