This commit is contained in:
sunkaixuan
2017-11-23 16:07:02 +08:00
parent 19d28bc6c5
commit 07287e33e1

View File

@@ -121,8 +121,7 @@ namespace SqlSugar
}
}
}
if (Context.IgnoreColumns != null && Context.IgnoreColumns.Any(it => it.PropertyName.Equals(propertyInfo.Name, StringComparison.CurrentCultureIgnoreCase)
&& it.EntityName.Equals(type.Name, StringComparison.CurrentCultureIgnoreCase)))
if (IsIgnore(type, propertyInfo))
{
continue;
}
@@ -146,9 +145,15 @@ namespace SqlSugar
DynamicBuilder.handler = (Load)method.CreateDelegate(typeof(Load));
return DynamicBuilder;
}
#endregion
#region Private methods
private bool IsIgnore(Type type, PropertyInfo propertyInfo)
{
return Context.IgnoreColumns != null && Context.IgnoreColumns.Any(it => it.PropertyName.Equals(propertyInfo.Name, StringComparison.CurrentCultureIgnoreCase)
&& it.EntityName.Equals(type.Name, StringComparison.CurrentCultureIgnoreCase));
}
private void BindClass(ILGenerator generator, LocalBuilder result, PropertyInfo propertyInfo)
{