dotnet tool uninstall --global dotnet-ef
dotnet tool install --global dotnet-ef --version 7.0.5
cd C:\Tmp\Example3\Example3\
//===============================================
// This will create .cs migration files in the directory Migration
// Note that "Initial" is an arbitrary name
dotnet ef migrations add Initial -o Migrations -c Example3.Test1DbContext
//=============================================
// This will apply all migrations to database that are not
// already applied. It will create the database if needed.
dotnet ef database update -c Example3.Test1DbContext
//==================================================
没有合适的资源?快使用搜索试试~ 我知道了~
29-EF7-CodeFirst-CLI-Code.zip
共14个文件
cs:9个
txt:2个
csproj:1个
需积分: 5 0 下载量 66 浏览量
2024-02-01
20:21:08
上传
评论
收藏 8KB ZIP 举报
温馨提示
在本文中,我们将演示如何使用命令行(CLI)在Entity Framework Core 7中实际实现“代码优先”方法。可以使用CLI EF Core工具从实体框架模型创建数据库。
资源推荐
资源详情
资源评论
收起资源包目录
29_EF7_CodeFirst_CLI_Code.zip (14个子文件)
Code
Example3
Example3.sln 1KB
Example3
Test1DbContextFactory.cs 1KB
Example3.csproj 1KB
ReadMe.txt 656B
EntityDataModel
Person.cs 420B
Program.cs 542B
Migrations
Test1DbContextModelSnapshot.cs 2KB
20230530053706_Work.Designer.cs 2KB
20230530053706_Work.cs 749B
20230529150910_Initial.Designer.cs 2KB
20230529150910_Initial.cs 1KB
Test1DbContext.cs 458B
appsettings.json 143B
ReadMe.txt 0B
共 14 条
- 1
资源评论
寒冰屋
- 粉丝: 994
- 资源: 573
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功