优化编译不使用内部取反
This commit is contained in:
parent
626bbb0f4c
commit
e02225e32e
|
@ -191,7 +191,7 @@ namespace ShardingCore.Core.Internal.Visitors
|
||||||
var dbContextDependencies =
|
var dbContextDependencies =
|
||||||
typeof(DbContext).GetTypePropertyValue(_dbContext, "DbContextDependencies") as
|
typeof(DbContext).GetTypePropertyValue(_dbContext, "DbContextDependencies") as
|
||||||
IDbContextDependencies;
|
IDbContextDependencies;
|
||||||
#if !EFCORE7&& !EFCORE8
|
#if EFCORE5 || EFCORE6
|
||||||
var targetIQ =
|
var targetIQ =
|
||||||
(IQueryable)((IDbSetCache)_dbContext).GetOrAddSet(dbContextDependencies.SetSource,
|
(IQueryable)((IDbSetCache)_dbContext).GetOrAddSet(dbContextDependencies.SetSource,
|
||||||
queryRootExpression.EntityType.ClrType);
|
queryRootExpression.EntityType.ClrType);
|
||||||
|
@ -209,7 +209,7 @@ namespace ShardingCore.Core.Internal.Visitors
|
||||||
RootIsVisit = true;
|
RootIsVisit = true;
|
||||||
if (queryRootExpression is FromSqlQueryRootExpression fromSqlQueryRootExpression)
|
if (queryRootExpression is FromSqlQueryRootExpression fromSqlQueryRootExpression)
|
||||||
{
|
{
|
||||||
#if !EFCORE7 && !EFCORE8
|
#if EFCORE5 || EFCORE6
|
||||||
var sqlQueryRootExpression = new FromSqlQueryRootExpression(newQueryable.Provider as IAsyncQueryProvider,
|
var sqlQueryRootExpression = new FromSqlQueryRootExpression(newQueryable.Provider as IAsyncQueryProvider,
|
||||||
queryRootExpression.EntityType, fromSqlQueryRootExpression.Sql,
|
queryRootExpression.EntityType, fromSqlQueryRootExpression.Sql,
|
||||||
fromSqlQueryRootExpression.Argument);
|
fromSqlQueryRootExpression.Argument);
|
||||||
|
|
Loading…
Reference in New Issue