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()
        {

        }

  

原文地址:https://www.cnblogs.com/mvpbest/p/13290046.html