.net core ef code first 使用步骤
1 创建类库项目

2 创建可执行项目(Web 或者 Console)
添加项目引用

3 编辑web项目nuget 引用
加入

4 修改web项目入口startup.cs

注意修改MigrationsAssembly为web项目名称空间
5 打开powershell并且cd到web项目
运行命令dotnet ef database update -c BsDbContext
BsDbContext为DbContext类名

其他命令参考:
https://docs.microsoft.com/en-us/ef/core/miscellaneous/cli/dotnet