diff --git a/Yi.Framework/Yi.Framework.ApiMicroservice/Controllers/MouldController.cs b/Yi.Framework/Yi.Framework.ApiMicroservice/Controllers/MouldController.cs index 8b64de62..46c17211 100644 --- a/Yi.Framework/Yi.Framework.ApiMicroservice/Controllers/MouldController.cs +++ b/Yi.Framework/Yi.Framework.ApiMicroservice/Controllers/MouldController.cs @@ -61,5 +61,7 @@ namespace Yi.Framework.ApiMicroservice.Controllers await _mouldService.AddAsync(_mould); return Result.Success(); } + + } } diff --git a/Yi.Framework/Yi.Framework.ApiMicroservice/Yi.Framework.ApiMicroservice.csproj b/Yi.Framework/Yi.Framework.ApiMicroservice/Yi.Framework.ApiMicroservice.csproj index c84c99f5..94766da2 100644 --- a/Yi.Framework/Yi.Framework.ApiMicroservice/Yi.Framework.ApiMicroservice.csproj +++ b/Yi.Framework/Yi.Framework.ApiMicroservice/Yi.Framework.ApiMicroservice.csproj @@ -21,6 +21,7 @@ + diff --git a/Yi.Framework/Yi.Framework.Interface/T4IService.cs b/Yi.Framework/Yi.Framework.Interface/T4IService.cs new file mode 100644 index 00000000..e02abfc9 --- /dev/null +++ b/Yi.Framework/Yi.Framework.Interface/T4IService.cs @@ -0,0 +1 @@ + diff --git a/Yi.Framework/Yi.Framework.Interface/T4IService.tt b/Yi.Framework/Yi.Framework.Interface/T4IService.tt new file mode 100644 index 00000000..2570a5f1 --- /dev/null +++ b/Yi.Framework/Yi.Framework.Interface/T4IService.tt @@ -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(); + +#> diff --git a/Yi.Framework/Yi.Framework.Model/T4DaraContext.cs b/Yi.Framework/Yi.Framework.Model/T4DaraContext.cs new file mode 100644 index 00000000..e02abfc9 --- /dev/null +++ b/Yi.Framework/Yi.Framework.Model/T4DaraContext.cs @@ -0,0 +1 @@ + diff --git a/Yi.Framework/Yi.Framework.Model/T4DaraContext.tt b/Yi.Framework/Yi.Framework.Model/T4DaraContext.tt new file mode 100644 index 00000000..2570a5f1 --- /dev/null +++ b/Yi.Framework/Yi.Framework.Model/T4DaraContext.tt @@ -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(); + +#> diff --git a/Yi.Framework/Yi.Framework.Model/Yi.Framework.Model.csproj b/Yi.Framework/Yi.Framework.Model/Yi.Framework.Model.csproj index 5df1a14f..abe851b9 100644 --- a/Yi.Framework/Yi.Framework.Model/Yi.Framework.Model.csproj +++ b/Yi.Framework/Yi.Framework.Model/Yi.Framework.Model.csproj @@ -8,6 +8,14 @@ + + + True + True + T4DaraContext.tt + + + @@ -16,4 +24,23 @@ + + + TextTemplatingFileGenerator + T4DaraContext.cs + + + + + + + + + + True + True + T4DaraContext.tt + + + diff --git a/Yi.Framework/Yi.Framework.Service/T4Service.cs b/Yi.Framework/Yi.Framework.Service/T4Service.cs new file mode 100644 index 00000000..e02abfc9 --- /dev/null +++ b/Yi.Framework/Yi.Framework.Service/T4Service.cs @@ -0,0 +1 @@ + diff --git a/Yi.Framework/Yi.Framework.Service/T4Service.tt b/Yi.Framework/Yi.Framework.Service/T4Service.tt new file mode 100644 index 00000000..2570a5f1 --- /dev/null +++ b/Yi.Framework/Yi.Framework.Service/T4Service.tt @@ -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(); + +#>