From 706cb888c89d92beba3d7e6ad18b8032418b602e Mon Sep 17 00:00:00 2001 From: hang <87227557@qq.com> Date: Wed, 4 Sep 2024 23:36:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E5=A2=9E=E5=8A=A0=E6=94=BE?= =?UTF-8?q?=E5=85=A5=E7=9A=84=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Test/IRaCIS.Core.Test.csproj | 4 ++++ IRaCIS.Core.Test/Program.cs | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/IRaCIS.Core.Test/IRaCIS.Core.Test.csproj b/IRaCIS.Core.Test/IRaCIS.Core.Test.csproj index 7941a8ebe..fc8d2d1ec 100644 --- a/IRaCIS.Core.Test/IRaCIS.Core.Test.csproj +++ b/IRaCIS.Core.Test/IRaCIS.Core.Test.csproj @@ -74,6 +74,10 @@ + + + + diff --git a/IRaCIS.Core.Test/Program.cs b/IRaCIS.Core.Test/Program.cs index fcbfbce59..5c692dbac 100644 --- a/IRaCIS.Core.Test/Program.cs +++ b/IRaCIS.Core.Test/Program.cs @@ -55,6 +55,9 @@ partial class Program var fileName=Path.GetFileNameWithoutExtension(templateFilePath); + //模板放入具体的文件夹 + var folder = fileName == "Entity" ? "Entity" : fileName.Replace("Entity", ""); + foreach (var tableName in tableNames) { var model = new TemplateModel @@ -75,7 +78,7 @@ partial class Program //Console.WriteLine(template.Render(context)); - string outputFilePath = Path.Combine(outPutTemplateFolderPath, $"{fileName.Replace("Entity", tableName)}.cs"); + string outputFilePath = Path.Combine(outPutTemplateFolderPath, folder, $"{fileName.Replace("Entity", tableName)}.cs"); File.WriteAllText(outputFilePath, template.Render(context)); }