当前位置:网站首页>通过EF Core框架根据SQL Server数据库表生成实体类
通过EF Core框架根据SQL Server数据库表生成实体类
2022-06-30 11:56:00 【新鑫S】
导入三个包,运行一个脚手架命令即可。
NuGet包
Microsoft.EntityFrameworkCore
Microsoft.EntityFrameworkCore.Tools
Microsoft.EntityFrameworkCore.SqlServer
Microsoft.EntityFrameworkCore.Design
NuGet包管理器控制台运行
一、打开NuGet包管理器控制台,依次运行以下四个命令:
Install-Package Microsoft.EntityFrameworkCore.SqlServer
Install-Package Microsoft.EntityFrameworkCore.Tools
Install-Package Microsoft.EntityFrameworkCore.SqlServer.Design
二、前面部分是数据库连接字符串,Microsoft.EntityFrameworkCore.SqlServer是数据库类型,-OutputDir Models是保存到哪个文件夹。
caffold-DbContext 'Data Source=服务器名称;Initial Catalog=数据库;User ID=登录名;Password=密码;MultipleActiveResultSets=True;Connection Timeout=120' Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models -Context DbContext
边栏推荐
- ClipboardJS——开发学习总结1
- Flutter 从零开始 007 输入框
- 1020. number of enclaves
- R语言ggplot2可视化:gganimate包基于transition_time函数创建动态散点图动画(gif)
- 使用深度学习进行生物网络分析
- Paper interpretation (AGC) attributed graph clustering via adaptive graph revolution
- A new journey of the smart court, paperless office, escorting the green trial of the smart court
- R语言ggplot2可视化:gganimate包基于transition_time函数创建动态散点图动画(gif)、使用labs函数为动画图添加动态时间标题(抽取frame_time信息)
- 3D线光谱共焦传感器在半导体如何检测
- Using cookie technology to realize historical browsing records and control the number of displays
猜你喜欢

wallys/IPQ8074a/2x(4 × 4 or 8 × 8) 11AX MU-MIMO DUAL CONCURRENT EMBEDDEDBOARD

In depth analysis of Apache bookkeeper series: Part 4 - back pressure

Another miserable day by kotlin grammar

Map集合

【云原生 | Kubernetes篇】深入了解Deployment(八)

麒麟软件韩乃平:数字中国建设需要自己的开源根社区

beego开发博客系统学习(二)

Yolov5 export the pit encountered by onnx

Hannaiping of Qilin software: the construction of Digital China needs its own open source root community

AGCO AI frontier promotion (6.30)
随机推荐
VScode选中多个单词
Cache avalanche and cache penetration solutions
90.(cesium篇)cesium高度监听事件
实现多方数据安全共享,解决普惠金融信息不对称难题
Getting started with the go language is simple: go handles XML files
Yolov5 export the pit encountered by onnx
shell第一个命令结果传入第二个命令删除
It is said that with this, the boss opened the test overnight
R语言ggplot2可视化:使用ggplot2可视化散点图、在geom_point参数中设置show_legend参数为FALSE配置不显示图例信息
[pattern recognition]
MATLAB中polarplot函数使用
Installing onnx is very slow. Use Tsinghua image
Flutter 从零开始 007 输入框
How can c write an SQL parser
Map集合
21、wpf之绑定使用小记
Constructor, class member, destructor call order
Redis - SDS simple dynamic string
线下门店为什么要做新零售?
R语言ggplot2可视化:使用ggplot2可视化散点图、在geom_point参数中设置alpha参数指定数据点的透明度级别(points transparent、从0到1)