优化代码发布版本x.3.1.48

This commit is contained in:
xuejiaming 2021-11-23 14:01:57 +08:00
parent a03ba59a77
commit b64829636b
2 changed files with 6 additions and 5 deletions

View File

@ -1,9 +1,9 @@
:start
::定义版本
set EFCORE2=2.3.1.47
set EFCORE3=3.3.1.47
set EFCORE5=5.3.1.47
set EFCORE6=6.3.1.47
set EFCORE2=2.3.1.48
set EFCORE3=3.3.1.48
set EFCORE5=5.3.1.48
set EFCORE6=6.3.1.48
::删除所有bin与obj下的文件
@echo off

View File

@ -32,7 +32,8 @@ namespace ShardingCore.Core.Internal.Visitors
{
var dbContextDependencies = typeof(DbContext).GetTypePropertyValue(_dbContext, "DbContextDependencies") as IDbContextDependencies;
var targetIQ = (IQueryable)((IDbSetCache)_dbContext).GetOrAddSet(dbContextDependencies.SetSource, queryable.ElementType);
var newQueryable = targetIQ.Provider.CreateQuery((Expression) Expression.Call((Expression) null, typeof(EntityFrameworkQueryableExtensions).GetTypeInfo().GetDeclaredMethod("AsNoTracking").MakeGenericMethod(queryable.ElementType), targetIQ.Expression));
//var newQueryable = targetIQ.Provider.CreateQuery((Expression) Expression.Call((Expression) null, typeof(EntityFrameworkQueryableExtensions).GetTypeInfo().GetDeclaredMethod("AsNoTracking").MakeGenericMethod(queryable.ElementType), targetIQ.Expression));
var newQueryable = targetIQ.Provider.CreateQuery(targetIQ.Expression);
Source = newQueryable;
// return base.Visit(Expression.Constant(newQueryable));
return Expression.Constant(newQueryable);