当前位置:网站首页>Generate entity classes from SQL Server database tables through EF core framework
Generate entity classes from SQL Server database tables through EF core framework
2022-06-30 12:18:00 【Xinxin s】
Import three packages , Run a scaffold command .
NuGet package
Microsoft.EntityFrameworkCore
Microsoft.EntityFrameworkCore.Tools
Microsoft.EntityFrameworkCore.SqlServer
Microsoft.EntityFrameworkCore.Design
NuGet The package manager console runs
One 、 open NuGet Package manager console , Run the following four commands in sequence :
Install-Package Microsoft.EntityFrameworkCore.SqlServer
Install-Package Microsoft.EntityFrameworkCore.Tools
Install-Package Microsoft.EntityFrameworkCore.SqlServer.Design
Two 、 The first part is the database connection string ,Microsoft.EntityFrameworkCore.SqlServer Is the database type ,-OutputDir Models Which folder is saved to .
caffold-DbContext 'Data Source= Server name ;Initial Catalog= database ;User ID= Login name ;Password= password ;MultipleActiveResultSets=True;Connection Timeout=120' Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models -Context DbContext
边栏推荐
- Redis - SDS simple dynamic string
- Introduction to the pursuit of new subtrate source code - early May: xcm officially launched
- Conference Preview - Huawei 2012 lab global software technology summit - European session
- [cf] 803 div2 A. XOR Mixup
- Swagger2自动生成APi文档
- MySQL 复合查询
- Object mapping - mapping Mapster
- 论文解读(AGC)《Attributed Graph Clustering via Adaptive Graph Convolution》
- 1020. number of enclaves
- time 函数和 clock_gettime()函数的区别
猜你喜欢
随机推荐
Go 语言入门很简单:Go 处理 XML 文件
8253 counter introduction
R language ggplot2 visualization: gganimate package is based on Transition_ Time function to create dynamic scatter animation (GIF)
21、wpf之绑定使用小记
海思3559 sample解析:venc
Getting started with the go language is simple: go handles XML files
各厂家rtsp地址格式如下:
Shutter 007 input field from zero
What are the applications of 3D visual inspection in production flow
1020. number of enclaves
lvgl 小部件样式篇
SuperMap iDesktop 常见倾斜数据处理全流程解析
网络营销之四大误解
Yolov5 export the pit encountered by onnx
Paper interpretation (AGC) attributed graph clustering via adaptive graph revolution
Lvgl widget styles
Shutter start from zero 006 radio switches and checkboxes
海思3559万能平台搭建:获取数据帧修改后编码
Map集合
A high precision positioning approach for category support components with multiscale difference reading notes









