- 增加 linq to sql 的查询语法,以及单元测试;

This commit is contained in:
28810
2019-05-07 19:09:19 +08:00
parent 7a625be8c9
commit 59b1b7220d
13 changed files with 351 additions and 20 deletions

View File

@ -18,7 +18,7 @@ namespace FreeSql.Internal {
static ConcurrentDictionary<DataType, ConcurrentDictionary<Type, TableInfo>> _cacheGetTableByEntity = new ConcurrentDictionary<DataType, ConcurrentDictionary<Type, TableInfo>>();
internal static void RemoveTableByEntity(Type entity, CommonUtils common) {
if (entity.FullName.StartsWith("<>f__AnonymousType") ||
if (entity.IsAnonymousType() ||
entity.IsValueType ||
entity.IsNullableType() ||
entity.NullableTypeOrThis() == typeof(BigInteger)
@ -27,7 +27,7 @@ namespace FreeSql.Internal {
if (tbc.TryRemove(entity, out var trytb) && trytb?.TypeLazy != null) tbc.TryRemove(trytb.TypeLazy, out var trylz);
}
internal static TableInfo GetTableByEntity(Type entity, CommonUtils common) {
if (entity.FullName.StartsWith("<>f__AnonymousType") ||
if (entity.IsAnonymousType() ||
entity.IsValueType ||
entity.IsNullableType() ||
entity.NullableTypeOrThis() == typeof(BigInteger)