- 优化 ICodeFirst.SyncStructure 错误提示,当使用不可迁移实体时;

This commit is contained in:
28810
2019-05-21 15:57:19 +08:00
parent 5a69128807
commit d54b245ba5
7 changed files with 37 additions and 11 deletions

View File

@ -35,7 +35,7 @@ namespace FreeSql.Internal {
var tbc = _cacheGetTableByEntity.GetOrAdd(common._orm.Ado.DataType, k1 => new ConcurrentDictionary<Type, TableInfo>()); //区分数据库类型缓存
if (tbc.TryGetValue(entity, out var trytb)) return trytb;
if (common.CodeFirst.GetDbInfo(entity) != null) return null;
if (typeof(IEnumerable).IsAssignableFrom(entity)) return null;
if (typeof(IEnumerable).IsAssignableFrom(entity) && entity.IsGenericParameter == true) return null;
if (entity.IsArray) return null;
var tbattr = common.GetEntityTableAttribute(entity);