上传T4模板
This commit is contained in:
@@ -61,5 +61,7 @@ namespace Yi.Framework.ApiMicroservice.Controllers
|
|||||||
await _mouldService.AddAsync(_mould);
|
await _mouldService.AddAsync(_mould);
|
||||||
return Result.Success();
|
return Result.Success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\Yi.Framework.DTOModel\Yi.Framework.DTOModel.csproj" />
|
||||||
<ProjectReference Include="..\Yi.Framework.Interface\Yi.Framework.Interface.csproj" />
|
<ProjectReference Include="..\Yi.Framework.Interface\Yi.Framework.Interface.csproj" />
|
||||||
<ProjectReference Include="..\Yi.Framework.Model\Yi.Framework.Model.csproj" />
|
<ProjectReference Include="..\Yi.Framework.Model\Yi.Framework.Model.csproj" />
|
||||||
<ProjectReference Include="..\Yi.Framework.Service\Yi.Framework.Service.csproj" />
|
<ProjectReference Include="..\Yi.Framework.Service\Yi.Framework.Service.csproj" />
|
||||||
|
|||||||
1
Yi.Framework/Yi.Framework.Interface/T4IService.cs
Normal file
1
Yi.Framework/Yi.Framework.Interface/T4IService.cs
Normal file
@@ -0,0 +1 @@
|
|||||||
|
|
||||||
15
Yi.Framework/Yi.Framework.Interface/T4IService.tt
Normal file
15
Yi.Framework/Yi.Framework.Interface/T4IService.tt
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
<#@ 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.Reflection" #>
|
||||||
|
<#@ import namespace="System.IO" #>
|
||||||
|
<#@ output extension=".cs" #>
|
||||||
|
|
||||||
|
<#
|
||||||
|
string solutionsPath = Host.ResolveAssemblyReference("$(SolutionDir)");//获取解决方案路径
|
||||||
|
Assembly assembly = Assembly.LoadFrom(System.IO.Path.Combine(solutionsPath, @"Yi.Framework.ApiMicroservice\bin\Debug\net5.0\Yi.Framework.Model.dll"));
|
||||||
|
Type[] ts = assembly.GetTypes();
|
||||||
|
|
||||||
|
#>
|
||||||
1
Yi.Framework/Yi.Framework.Model/T4DaraContext.cs
Normal file
1
Yi.Framework/Yi.Framework.Model/T4DaraContext.cs
Normal file
@@ -0,0 +1 @@
|
|||||||
|
|
||||||
15
Yi.Framework/Yi.Framework.Model/T4DaraContext.tt
Normal file
15
Yi.Framework/Yi.Framework.Model/T4DaraContext.tt
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
<#@ 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.Reflection" #>
|
||||||
|
<#@ import namespace="System.IO" #>
|
||||||
|
<#@ output extension=".cs" #>
|
||||||
|
|
||||||
|
<#
|
||||||
|
string solutionsPath = Host.ResolveAssemblyReference("$(SolutionDir)");//获取解决方案路径
|
||||||
|
Assembly assembly = Assembly.LoadFrom(System.IO.Path.Combine(solutionsPath, @"Yi.Framework.ApiMicroservice\bin\Debug\net5.0\Yi.Framework.Model.dll"));
|
||||||
|
Type[] ts = assembly.GetTypes();
|
||||||
|
|
||||||
|
#>
|
||||||
@@ -8,6 +8,14 @@
|
|||||||
<Folder Include="Search\" />
|
<Folder Include="Search\" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="T4DaraContext.cs">
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>T4DaraContext.tt</DependentUpon>
|
||||||
|
</None>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="5.0.10" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="5.0.10" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
@@ -16,4 +24,23 @@
|
|||||||
<ProjectReference Include="..\Yi.Framework.Common\Yi.Framework.Common.csproj" />
|
<ProjectReference Include="..\Yi.Framework.Common\Yi.Framework.Common.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<None Update="T4DaraContext.tt">
|
||||||
|
<Generator>TextTemplatingFileGenerator</Generator>
|
||||||
|
<LastGenOutput>T4DaraContext.cs</LastGenOutput>
|
||||||
|
</None>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Service Include="{508349b6-6b84-4df5-91f0-309beebad82d}" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Update="T4DaraContext.cs">
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>T4DaraContext.tt</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
1
Yi.Framework/Yi.Framework.Service/T4Service.cs
Normal file
1
Yi.Framework/Yi.Framework.Service/T4Service.cs
Normal file
@@ -0,0 +1 @@
|
|||||||
|
|
||||||
15
Yi.Framework/Yi.Framework.Service/T4Service.tt
Normal file
15
Yi.Framework/Yi.Framework.Service/T4Service.tt
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
<#@ 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.Reflection" #>
|
||||||
|
<#@ import namespace="System.IO" #>
|
||||||
|
<#@ output extension=".cs" #>
|
||||||
|
|
||||||
|
<#
|
||||||
|
string solutionsPath = Host.ResolveAssemblyReference("$(SolutionDir)");//获取解决方案路径
|
||||||
|
Assembly assembly = Assembly.LoadFrom(System.IO.Path.Combine(solutionsPath, @"Yi.Framework.ApiMicroservice\bin\Debug\net5.0\Yi.Framework.Model.dll"));
|
||||||
|
Type[] ts = assembly.GetTypes();
|
||||||
|
|
||||||
|
#>
|
||||||
Reference in New Issue
Block a user