This commit is contained in:
sunkaixuan
2017-04-30 23:02:04 +08:00
parent dcc026d5bc
commit efe78d767e

View File

@@ -5,34 +5,48 @@ using System.Text;
namespace SqlSugar
{
public class MappingTableList : List<MappingTable>
public class MappingTableList : List<MappingTable>
{
public void Add(string entityName, string dbTableName)
{
this.RemoveAll(it => it.EntityName.Equals(entityName, StringComparison.CurrentCultureIgnoreCase));
this.Add(new MappingTable() { EntityName = entityName, DbTableName = dbTableName });
}
public void Add(string entityName, string dbTableName,string dbTableShortName)
public void Add(string entityName, string dbTableName, string dbTableShortName)
{
this.RemoveAll(it => it.EntityName.Equals(entityName, StringComparison.CurrentCultureIgnoreCase));
this.Add(new MappingTable() { EntityName = entityName, DbTableName = dbTableName, DbShortTaleName =dbTableShortName});
this.Add(new MappingTable() { EntityName = entityName, DbTableName = dbTableName, DbShortTaleName = dbTableShortName });
}
}
public class IgnoreComumnList : List<IgnoreComumn> {
public void Add(string EntityPropertyName,string EntityName)
public new void Clear()
{
this.RemoveAll(it => it.EntityPropertyName.Equals(EntityPropertyName, StringComparison.CurrentCultureIgnoreCase));
this.Add(new IgnoreComumn() { EntityPropertyName = EntityPropertyName, EntityName=EntityName});
this.RemoveAll(it=>true);
}
}
public class MappingColumnList: List<MappingColumn>
public class IgnoreComumnList : List<IgnoreComumn>
{
public void Add(string EntityPropertyName, string dbColumnName,string dbTableName)
public void Add(string EntityPropertyName, string EntityName)
{
this.RemoveAll(it => it.EntityPropertyName.Equals(EntityPropertyName, StringComparison.CurrentCultureIgnoreCase));
this.Add(new MappingColumn() { EntityPropertyName = EntityPropertyName, DbColumnName = dbColumnName, DbTableName= dbTableName });
this.Add(new IgnoreComumn() { EntityPropertyName = EntityPropertyName, EntityName = EntityName });
}
public new void Clear()
{
this.RemoveAll(it => true);
}
}
public class MappingColumnList : List<MappingColumn>
{
public void Add(string EntityPropertyName, string dbColumnName, string dbTableName)
{
this.RemoveAll(it => it.EntityPropertyName.Equals(EntityPropertyName, StringComparison.CurrentCultureIgnoreCase));
this.Add(new MappingColumn() { EntityPropertyName = EntityPropertyName, DbColumnName = dbColumnName, DbTableName = dbTableName });
}
public new void Clear()
{
this.RemoveAll(it => true);
}
}
}