标签:res reg exp cad ati database 数据库 lan ===
===数据库优先===
https://docs.microsoft.com/en-us/ef/core/miscellaneous/cli/powershell
https://docs.microsoft.com/zh-cn/ef/core/managing-schemas/scaffolding?tabs=dotnet-core-cli
生成迁移 bat_Migrations.bat
@echo off setlocal enabledelayedexpansion set gztmp=register set gzcontext=RegisterEntitiesContext set gzproject=../GZSales.API.Register echo 请输入迁移名称 set /p gzname= echo 迁移生成中,请稍后... dotnet ef migrations add %gzname%%gztmp% --context %gzcontext% --project "%gzproject%" --startup-project "../GZSales.API.Start" pause
刷新模型:bat_refreshModel
dotnet ef dbcontext scaffold Name=ConnectionStrings.GZNETCore.Developer Microsoft.EntityFrameworkCore.SqlServer --output-dir "Tables" --table "data_register_product" --table "data_register_EzCadTools" --use-database-names --force --data-annotations --context "_RegisterEntitiesContext" --project "../GZSales.API.Register" --startup-project "../GZSales.API.Start" pause
EFCore Database-first 批处理生成表结构
标签:res reg exp cad ati database 数据库 lan ===
原文地址:https://www.cnblogs.com/GarsonZhang/p/13943139.html