Entity Framework Core - Migration - No Parameterless Constructor Defined for this Object

前端 未结 4 1637
野的像风
野的像风 2021-01-11 22:19

I am working with the latest .Net Core and EF Core in Visual Studio 2017. I have created a model and it was working great. I have since made some modifications and am gett

4条回答
  •  -上瘾入骨i
    2021-01-11 23:20

    I had the same error "No parameterless constructor defined for type ..." while trying to adda migration. Turns out that when running ef migrations entity framework passes on arguments in the startup project Program.cs The string[] args was removed for security reasons. Adding this resolved the issue.

提交回复
热议问题