ICodeFirst add GetConfigEntity

This commit is contained in:
28810
2019-02-22 09:16:07 +08:00
parent be84f6dbd6
commit fb1871e558
9 changed files with 28 additions and 2 deletions

View File

@ -50,6 +50,9 @@ namespace FreeSql.Internal {
Utils.GetTableByEntity(type, this, true); //update cache
return _orm.CodeFirst;
}
internal TableAttribute GetConfigEntity(Type type) {
return dicConfigEntity.TryGetValue(type, out var trytb) ? trytb : null;
}
internal TableAttribute GetEntityTableAttribute(Type type) {
var attr = type.GetCustomAttributes(typeof(TableAttribute), false).LastOrDefault() as TableAttribute;
if (dicConfigEntity.TryGetValue(type, out var trytb) == false) return attr;