EFCore中CoreFrist多个上下文

CoreFrist多个上下文

出现这个怎么解决:No DbContext was found in assembly' ShopCore'. Ensure that you' re using the correct assembly and that the type is neither abstract nor generic.

 

 

add-migration migrationname -c AppDbContext

 

 

如果出现:Unable to create an object of type 'AppDbContext'. For the different patterns supported at design time, see https://go.microsoft.com/fwlink/?linkid=851728

 

就是说明:缺少无参构造函数

例如:

public AppDbContext()
        {

        }

  

 

posted @ 2020-07-12 21:38  我的未来方程式i  阅读(828)  评论(0编辑  收藏  举报