(1)首先在appsettings.json文件中填写连接信息
(2)到Program.cs中注册并使用
(3)然后就能对数据库进行迁移,dotnet ef migrations add xxx(随便什么名字),迁入成功有提示且生成Migrations文件夹
(4)继续敲入dotnet ef database update,然后成功提示,并且看到数据库添加了这两个b表,说明数据通过ef映射到数据库中
(1)首先在appsettings.json文件中填写连接信息
(2)到Program.cs中注册并使用
(3)然后就能对数据库进行迁移,dotnet ef migrations add xxx(随便什么名字),迁入成功有提示且生成Migrations文件夹
(4)继续敲入dotnet ef database update,然后成功提示,并且看到数据库添加了这两个b表,说明数据通过ef映射到数据库中