当前位置:网站首页>通过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
边栏推荐
- ModelAtrs声音检测,基于声学特征的异响检测
- Shutter start from zero 006 radio switches and checkboxes
- R语言ggplot2可视化:使用ggplot2可视化散点图、在geom_point参数中设置show_legend参数为FALSE配置不显示图例信息
- Who still remembers "classmate Zhang"?
- Redis6学习笔记-第二章-Redis6的基本操作
- Learn how to implement distributed locks in redis - my own understanding
- R language ggplot2 visualization: use ggplot2 to visualize the scatter diagram, and_ Set the alpha parameter in the point parameter to specify the transparency level of data points (points transparent
- 60 divine vs Code plug-ins!!
- Lucene full text search toolkit learning notes summary
- R language ggplot2 visualization: use ggplot2 visualization scatter diagram and the color parameter in AES function to specify that data points in different groups are displayed in different colors
猜你喜欢

wallys/600VX – 2 × 2 MIMO 802.11ac Mini PCIe Wi-Fi Module, Dual Band, 2,4GHz / 5GHz QCA 9880

MySQL索引和优化的理解学习

Our company has used this set of general solutions for 7 years, and has opened up dozens of systems, a stable batch!

服务器常用的一些硬件信息(不断更新)

OpenMLDB Meetup No.4 会议纪要

AUTOCAD——LEN命令

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

爱可可AI前沿推介(6.30)

wallys/3 × 3 MIMO 802.11ac Mini PCIe Wi-Fi Module, QCA9880, 2,4GHz / 5GHzDesigned for Enterprise

光谱共焦位移传感器的原理是什么?能应用那些领域?
随机推荐
并行接口8255A
The sci-fi ideas in these movies have been realized by AI
nvm安装node后,在使用npm指令时候显示不是内部或外部指令
Constructor, class member, destructor call order
Map集合
A Generic Deep-Learning-Based Approach for Automated Surface Inspection-論文閱讀筆記
Limited time appointment | Apache pulsar Chinese developer and user group meeting in June
NoSQL——Redis的配置与优化
1254. 统计封闭岛屿的数目
Four Misunderstandings of Internet Marketing
A new journey of the smart court, paperless office, escorting the green trial of the smart court
来聊聊怎么做硬件兼容性检测,快速迁移到openEuler?
治数如治水,数据治理和数据创新难在哪?
ZABBIX monitors the number of TCP connections
Analysis of KOA - onion model
go-zero微服务实战系列(八、如何处理每秒上万次的下单请求)
Shutter start from zero 006 radio switches and checkboxes
TypeScript ReadonlyArray(只读数组类型) 详细介绍
zabbix监控TCP连接个数
移除无效的括号[用数组模拟栈]