This commit is contained in:
454313500@qq.com
2021-03-28 01:11:53 +08:00
parent 75ee279d5a
commit a400b05bdc
3 changed files with 57 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
<#@ template debug="false" hostspecific="true" language="C#" #>
<#@ assembly name="System.Core" #>
<#@ import namespace="System.Linq" #>
<#@ import namespace="System.Text" #>
<#@ import namespace="System.Collections.Generic" #>
<#@ import namespace="System.IO" #>
<#@ output extension=".cs" #>
<#
string solutionsPath = Host.ResolveAssemblyReference("$(SolutionDir)");//获取解决方案路径
string txt;
StreamReader sr = new StreamReader(solutionsPath+@"\T4Model\T4Model.txt");
txt=sr.ReadToEnd();
sr.Close();
string[] ModelData= txt.Split(',');
#>
using CC.Yi.Model;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace CC.Yi.IDAL
{
public partial interface IDbSession
{
<# foreach(string k in ModelData){
#>
I<#=k #>Dal <#=k #>Dal{get;}
<# } #>
}
}