mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-07-15 23:13:42 +08:00
-
This commit is contained in:
parent
158829460f
commit
5ad323e993
@ -338,6 +338,34 @@ namespace SqlSugar
|
|||||||
return mappingInfo.DbTableName;
|
return mappingInfo.DbTableName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
internal string GetEntityName(string tableName)
|
||||||
|
{
|
||||||
|
if (this.MappingTables == null || this.MappingTables.Count == 0) return tableName;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var mappingInfo = this.MappingTables.SingleOrDefault(it => it.DbTableName == tableName);
|
||||||
|
return mappingInfo.EntityName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
internal string GetDbColumnName<T>(string entityNam)
|
||||||
|
{
|
||||||
|
var typeName = typeof(T).Name;
|
||||||
|
if (this.MappingTables == null || this.MappingTables.Count == 0) return typeName;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var mappingInfo = this.MappingTables.SingleOrDefault(it => it.EntityName == typeName);
|
||||||
|
return mappingInfo.DbTableName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
internal string GetEntityPropertyName(string bbColumnName)
|
||||||
|
{
|
||||||
|
if (this.MappingTables == null || this.MappingTables.Count == 0) return tableName;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var mappingInfo = this.MappingTables.SingleOrDefault(it => it.DbTableName == tableName);
|
||||||
|
return mappingInfo.EntityName;
|
||||||
|
}
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user