当前位置:网站首页>通过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
边栏推荐
- STM32 porting the fish component of RT thread Standard Edition
- Swagger2自动生成APi文档
- It is said that with this, the boss opened the test overnight
- 1175. 质数排列 : 乘法原理运用题
- Biological network analysis using deep learning
- c# 怎样能写个sql的解析器
- R language ggplot2 visualization: use ggplot2 to visualize the scatter diagram and use scale_ x_ The log10 function configures the value range of the X axis to be logarithmic coordinates
- shell第一个命令结果传入第二个命令删除
- beego开发博客系统学习(二)
- WebView, Scrollview sliding conflict correction
猜你喜欢

用于生成学习任务的量子神经网络2022最新综述

How difficult is data governance and data innovation?
![移除无效的括号[用数组模拟栈]](/img/df/0a2ae5ae40adb833d52b2dddea291b.png)
移除无效的括号[用数组模拟栈]

智慧法院新征程,无纸化办公,护航智慧法院绿色庭审

How can c write an SQL parser

这些电影中的科幻构想,已经用AI实现了

Another miserable day by kotlin grammar

【LeetCode】15、三数之和

He was the first hero of Shanghai's two major industries, but died silently in regret
Redis - SDS simple dynamic string
随机推荐
time 函数和 clock_gettime()函数的区别
A High-Precision Positioning Approach for Catenary Support Components With Multiscale Difference阅读笔记
R语言ggplot2可视化:使用ggplot2可视化散点图、在geom_point参数中设置show_legend参数为FALSE配置不显示图例信息
NoSQL——Redis的配置与优化
实现多方数据安全共享,解决普惠金融信息不对称难题
AutoCAD - len command
Analysis of KOA - onion model
led背光板的作用是什么呢?
光谱共焦位移传感器的原理是什么?能应用那些领域?
R语言ggplot2可视化:使用ggplot2可视化散点图、aes函数中的colour参数指定不同分组的数据点使用不同的颜色显示
Embedded SIG | 多 OS 混合部署框架
Statistics on the number of closed Islands
论文解读(AGC)《Attributed Graph Clustering via Adaptive Graph Convolution》
A Generic Deep-Learning-Based Approach for Automated Surface Inspection-论文阅读笔记
DMA控制器8237A
Let's talk about how to do hardware compatibility testing and quickly migrate to openeuler?
YOLOv5导出onnx遇到的坑
It is said that with this, the boss opened the test overnight
HMS core audio editing service 3D audio technology helps create an immersive auditory feast
Cache avalanche and cache penetration solutions