Browse Source

DbFirst Bu

pull/12/MERGE
sunkaixuan 7 years ago
parent
commit
b4ff8c3513
  1. 6
      Src/Asp.Net/SqlSugar/Abstract/DbFirstProvider/DbFirstProvider.cs

6
Src/Asp.Net/SqlSugar/Abstract/DbFirstProvider/DbFirstProvider.cs

@ -137,6 +137,12 @@ namespace SqlSugar
foreach (var tableInfo in this.TableInfoList)
{
var columns = this.Context.DbMaintenance.GetColumnInfosByTableName(tableInfo.Name);
if (this.Context.IgnoreColumns.IsValuable()) {
var entityName = this.Context.EntityProvider.GetEntityName(tableInfo.Name);
columns = columns.Where(c =>
!this.Context.IgnoreColumns.Any(ig => ig.EntityName.Equals(entityName, StringComparison.CurrentCultureIgnoreCase)&&c.DbColumnName==ig.PropertyName)
).ToList();
}
string className = tableInfo.Name;
string classText = this.ClassTemplate;
string ConstructorText = IsDefaultValue ? this.ConstructorTemplate : null;

Loading…
Cancel
Save