diff --git a/Src/Asp.Net/SqlSugar/Abstract/DbFirstProvider/DbFirstProvider.cs b/Src/Asp.Net/SqlSugar/Abstract/DbFirstProvider/DbFirstProvider.cs index fcd123fb8..eaa196da3 100644 --- a/Src/Asp.Net/SqlSugar/Abstract/DbFirstProvider/DbFirstProvider.cs +++ b/Src/Asp.Net/SqlSugar/Abstract/DbFirstProvider/DbFirstProvider.cs @@ -89,6 +89,11 @@ namespace SqlSugar this.PropertyTemplate = func(this.PropertyTemplate); return this; } + public DbRazor SettingTemplate(string templatePath) + { + Check.Exception(true, ErrorMessage.GetThrowMessage("Use db.DbFirst.LoadTemplate('c:\\1.txt').CreateClassFile(classPath) Nuget Install SqlSugar.DbFirstRazor ", "当前方法已经过期,请使用 db.DbFirst.LoadTemplate('c:\\1.txt').CreateClassFile(classPath) Nuget 安装 SqlSugar.DbFirstRazor ")); + return null; + } #endregion #region Setting Content diff --git a/Src/Asp.Net/SqlSugar/Abstract/DbFirstProvider/DbRazor.cs b/Src/Asp.Net/SqlSugar/Abstract/DbFirstProvider/DbRazor.cs new file mode 100644 index 000000000..4d51cc570 --- /dev/null +++ b/Src/Asp.Net/SqlSugar/Abstract/DbFirstProvider/DbRazor.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SqlSugar +{ + public class DbRazor + { + public void CreateClassFile(string directoryPath) { + + } + } +} diff --git a/Src/Asp.Net/SqlSugar/Interface/IDbFirst.cs b/Src/Asp.Net/SqlSugar/Interface/IDbFirst.cs index cf36805f7..c558c7b8f 100644 --- a/Src/Asp.Net/SqlSugar/Interface/IDbFirst.cs +++ b/Src/Asp.Net/SqlSugar/Interface/IDbFirst.cs @@ -13,6 +13,7 @@ namespace SqlSugar IDbFirst SettingPropertyDescriptionTemplate(Func func); IDbFirst SettingConstructorTemplate(Func func); IDbFirst SettingNamespaceTemplate(Func func); + DbRazor SettingTemplate(string Path); IDbFirst IsCreateAttribute(bool isCreateAttribute = true); IDbFirst IsCreateDefaultValue(bool isCreateDefaultValue=true); IDbFirst Where(params string[] objectNames); diff --git a/Src/Asp.Net/SqlSugar/SqlSugar.csproj b/Src/Asp.Net/SqlSugar/SqlSugar.csproj index f9d9c5bde..47b1f627c 100644 --- a/Src/Asp.Net/SqlSugar/SqlSugar.csproj +++ b/Src/Asp.Net/SqlSugar/SqlSugar.csproj @@ -67,6 +67,7 @@ +