This commit is contained in:
sunkaixuan
2017-07-15 20:20:42 +08:00
parent 5c1e5dbcd4
commit edcddd49fc
8 changed files with 10 additions and 10 deletions

View File

@@ -103,7 +103,7 @@ new List<SugarParameter>() {
); );
db.IgnoreColumns = new IgnoreComumnList(); db.IgnoreColumns = new IgnoreColumnList();
db.IgnoreColumns.Add("TestId", "Student"); db.IgnoreColumns.Add("TestId", "Student");
//Insert List<T> //Insert List<T>

View File

@@ -103,7 +103,7 @@ new List<SugarParameter>() {
); );
db.IgnoreColumns = new IgnoreComumnList(); db.IgnoreColumns = new IgnoreColumnList();
db.IgnoreColumns.Add("TestId", "Student"); db.IgnoreColumns.Add("TestId", "Student");
//Insert List<T> //Insert List<T>

View File

@@ -6,7 +6,7 @@ using System.Threading.Tasks;
namespace SqlSugar namespace SqlSugar
{ {
public class IgnoreComumn public class IgnoreColumn
{ {
public string EntityName { get; set; } public string EntityName { get; set; }
public string PropertyName { get; set; } public string PropertyName { get; set; }

View File

@@ -23,12 +23,12 @@ namespace SqlSugar
} }
} }
public class IgnoreComumnList : List<IgnoreComumn> public class IgnoreColumnList : List<IgnoreColumn>
{ {
public void Add(string propertyName, string EntityName) public void Add(string propertyName, string EntityName)
{ {
this.RemoveAll(it =>it.EntityName==EntityName&&it.PropertyName.Equals(propertyName, StringComparison.CurrentCultureIgnoreCase)); this.RemoveAll(it =>it.EntityName==EntityName&&it.PropertyName.Equals(propertyName, StringComparison.CurrentCultureIgnoreCase));
this.Add(new IgnoreComumn() { PropertyName = propertyName, EntityName = EntityName }); this.Add(new IgnoreColumn() { PropertyName = propertyName, EntityName = EntityName });
} }
public new void Clear() public new void Clear()

View File

@@ -39,7 +39,7 @@ namespace SqlSugar
public int ParameterIndex { get; set; } public int ParameterIndex { get; set; }
public MappingColumnList MappingColumns { get; set; } public MappingColumnList MappingColumns { get; set; }
public MappingTableList MappingTables { get; set; } public MappingTableList MappingTables { get; set; }
public IgnoreComumnList IgnoreComumnList { get; set; } public IgnoreColumnList IgnoreComumnList { get; set; }
public bool IsSingle public bool IsSingle
{ {
get get

View File

@@ -10,7 +10,7 @@ namespace SqlSugar
{ {
MappingColumnList MappingColumns { get; set; } MappingColumnList MappingColumns { get; set; }
MappingTableList MappingTables { get; set; } MappingTableList MappingTables { get; set; }
IgnoreComumnList IgnoreComumnList { get; set; } IgnoreColumnList IgnoreComumnList { get; set; }
List<JoinQueryInfo> JoinQueryInfos { get; set; } List<JoinQueryInfo> JoinQueryInfos { get; set; }
bool IsSingle { get; set; } bool IsSingle { get; set; }
SqlSugarClient Context { get; set; } SqlSugarClient Context { get; set; }

View File

@@ -16,7 +16,7 @@ namespace SqlSugar
public Guid ContextID { get; set; } public Guid ContextID { get; set; }
public MappingTableList MappingTables = new MappingTableList(); public MappingTableList MappingTables = new MappingTableList();
public MappingColumnList MappingColumns = new MappingColumnList(); public MappingColumnList MappingColumns = new MappingColumnList();
public IgnoreComumnList IgnoreColumns = new IgnoreComumnList(); public IgnoreColumnList IgnoreColumns = new IgnoreColumnList();
#endregion #endregion
#region Fields #region Fields
@@ -89,7 +89,7 @@ namespace SqlSugar
if (this.MappingColumns == null) if (this.MappingColumns == null)
this.MappingColumns = new MappingColumnList(); this.MappingColumns = new MappingColumnList();
if (this.IgnoreColumns == null) if (this.IgnoreColumns == null)
this.IgnoreColumns = new IgnoreComumnList(); this.IgnoreColumns = new IgnoreColumnList();
if (!this.MappingTables.Any(it => it.EntityName == entityInfo.EntityName)) if (!this.MappingTables.Any(it => it.EntityName == entityInfo.EntityName))
{ {
if (entityInfo.DbTableName != entityInfo.EntityName && entityInfo.DbTableName.IsValuable()) if (entityInfo.DbTableName != entityInfo.EntityName && entityInfo.DbTableName.IsValuable())

View File

@@ -103,7 +103,7 @@ new List<SugarParameter>() {
); );
db.IgnoreColumns = new IgnoreComumnList(); db.IgnoreColumns = new IgnoreColumnList();
db.IgnoreColumns.Add("TestId", "Student"); db.IgnoreColumns.Add("TestId", "Student");
//Insert List<T> //Insert List<T>