v1.0.8
This commit is contained in:
@@ -14,6 +14,10 @@
|
|||||||
<Generator>TextTemplatingFileGenerator</Generator>
|
<Generator>TextTemplatingFileGenerator</Generator>
|
||||||
<LastGenOutput>T4IDAL.cs</LastGenOutput>
|
<LastGenOutput>T4IDAL.cs</LastGenOutput>
|
||||||
</None>
|
</None>
|
||||||
|
<None Update="T4IDbSession.tt">
|
||||||
|
<Generator>TextTemplatingFileGenerator</Generator>
|
||||||
|
<LastGenOutput>T4IDbSession.cs</LastGenOutput>
|
||||||
|
</None>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@@ -26,6 +30,11 @@
|
|||||||
<AutoGen>True</AutoGen>
|
<AutoGen>True</AutoGen>
|
||||||
<DependentUpon>T4IDAL.tt</DependentUpon>
|
<DependentUpon>T4IDAL.tt</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Update="T4IDbSession.cs">
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>T4IDbSession.tt</DependentUpon>
|
||||||
|
</Compile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
15
CC.Yi.IDAL/T4IDbSession.cs
Normal file
15
CC.Yi.IDAL/T4IDbSession.cs
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
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
|
||||||
|
{
|
||||||
|
IstudentDal studentDal{get;}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
33
CC.Yi.IDAL/T4IDbSession.tt
Normal file
33
CC.Yi.IDAL/T4IDbSession.tt
Normal 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;}
|
||||||
|
|
||||||
|
<# } #>
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user