Browse Source

Update DbFirst

pull/12/MERGE
sunkaixuan 6 years ago
parent
commit
9441108b04
  1. 5
      Src/Asp.Net/SqlSugar/Abstract/DbFirstProvider/DbFirstProvider.cs
  2. 15
      Src/Asp.Net/SqlSugar/Abstract/DbFirstProvider/DbRazor.cs
  3. 1
      Src/Asp.Net/SqlSugar/Interface/IDbFirst.cs
  4. 1
      Src/Asp.Net/SqlSugar/SqlSugar.csproj

5
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

15
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) {
}
}
}

1
Src/Asp.Net/SqlSugar/Interface/IDbFirst.cs

@ -13,6 +13,7 @@ namespace SqlSugar
IDbFirst SettingPropertyDescriptionTemplate(Func<string, string> func);
IDbFirst SettingConstructorTemplate(Func<string, string> func);
IDbFirst SettingNamespaceTemplate(Func<string, string> func);
DbRazor SettingTemplate(string Path);
IDbFirst IsCreateAttribute(bool isCreateAttribute = true);
IDbFirst IsCreateDefaultValue(bool isCreateDefaultValue=true);
IDbFirst Where(params string[] objectNames);

1
Src/Asp.Net/SqlSugar/SqlSugar.csproj

@ -67,6 +67,7 @@
<Compile Include="Abstract\DbBindProvider\IDataRecordExtensions.cs" />
<Compile Include="Abstract\DbFirstProvider\DbFirstProvider.cs" />
<Compile Include="Abstract\DbFirstProvider\DbFirstTemplate.cs" />
<Compile Include="Abstract\DbFirstProvider\DbRazor.cs" />
<Compile Include="Abstract\DbMaintenanceProvider\Methods.cs" />
<Compile Include="Abstract\DbMaintenanceProvider\Properties.cs" />
<Compile Include="Abstract\AdoProvider\AdoProvider.cs" />

Loading…
Cancel
Save