tiyor-db-t4 1.0.11

dotnet add package tiyor-db-t4 --version 1.0.11
NuGet\Install-Package tiyor-db-t4 -Version 1.0.11
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="tiyor-db-t4" Version="1.0.11" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add tiyor-db-t4 --version 1.0.11
#r "nuget: tiyor-db-t4, 1.0.11"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install tiyor-db-t4 as a Cake Addin
#addin nuget:?package=tiyor-db-t4&version=1.0.11

// Install tiyor-db-t4 as a Cake Tool
#tool nuget:?package=tiyor-db-t4&version=1.0.11

使用T4模板生成 MSSQL 实体类

实体类使用的特性头适配 Tiyor.Shearwall 框架 此版本针对 Visual Studio 2022 调用使用 Microsoft.VisualStudio.Interop.dll。

使用说明

1、复制 demo.tt 到需要的项目中

2、修改 demo.tt 第6行 DbContext.Generator.Controller.ttinclude 文件路径、第66行 DbContext.Generator.ttinclude 文件路径,如:

  %USERPROFILE%\.nuget\packages\tiyor-db-t4\1.0.x\DbContext.Generator.Controller.ttinclude
  %USERPROFILE%\.nuget\packages\tiyor-db-t4\1.0.x\DbContext.Generator.ttinclude

3、修改 demo.tt 中连接字符串、模板的默认命名空间、存储路径等设置

4、保存 demo.tt,如果Visual Studio编辑,保存后将立即编译执行

5、也可以使用命令行编译执行,如:

  C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\TextTransform demo.tt

6、如果使用 Visual Studio Code 编辑,可以安装 zbecknell.t4-support、formulahendry.code-runner 插件, settings.json 增加如下配置:

    "code-runner.executorMapByGlob": {
        "*.tt":"& \"C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\Common7\\IDE\\TextTransform\"",
    },

7、nuget_pack.bat 为nuget打包

8、github_publish.bat nuget打包后,可以执行此批处理上传到Github

   Usage: github_pack.bat <Owner> <User Name> <Personal Token>

感谢

PetaPoco

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.11 298 3/2/2023
1.0.10 262 3/2/2023
1.0.9 373 3/1/2021
1.0.8 332 3/1/2021
1.0.7 368 3/1/2021
1.0.6 324 2/2/2021
1.0.4 327 2/1/2021