zoukankan      html  css  js  c++  java
  • EFCore Database-first 批处理生成表结构

    ===数据库优先===
    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
  • 相关阅读:
    ES6新特性
    CSS Sprites (css精灵)
    标准盒子模型和IE盒子模型
    鼠标跟随运动效果
    git 命令大全
    JavaScript 原型链
    js基础---cookie存储
    html5新增标签
    css清除浮动的方法
    querySelectorAll与getElementsBy对比有什么不同
  • 原文地址:https://www.cnblogs.com/GarsonZhang/p/13943139.html
Copyright © 2011-2022 走看看