注册

EFCore linq生成SQL查询bool值不能使用

ᝰꫛꫀꪝ🌤 2024/04/23 587 1

为提高效率,提问时请提供以下信息,问题描述清晰可优先响应。
【DM版本】:dm8_20230808_rev197096_x86_rh6_64_single
【操作系统】:linux docker
【CPU】:x68
【问题描述】*:EFCore linq生成SQL查询bool值不能使用

[14:48:27 ERR] Failed executing DbCommand (11ms) [Parameters=[:__ef_filter__p_0='?' (DbType = Boolean), :__ef_filter__p_1='?' (DbType = Boolean)], CommandType='Text', CommandTimeout='30'] SELECT "d"."Id", "d"."CampusId", "d"."CreationTime", "d"."CreatorId", "d"."DeleterId", "d"."DeletionTime", "d"."IsDeleted", "d"."LastModificationTime", "d"."LastModifierId", "d"."Name", "d"."Sort", "d"."TenantId" FROM "DeviceGroup" AS "d" WHERE (:__ef_filter__p_0 OR NOT ("d"."IsDeleted")) AND (:__ef_filter__p_1 OR ("d"."TenantId" IS NULL)) ORDER BY "d"."Sort" [14:48:27 ERR] An exception occurred while iterating over the results of a query for context type 'Fisher361.SaasDeviceControlService.EntityFrameworkCore.SaasDeviceControlServiceControlServiceDbContext'. Dm.DmException (0x80004005): 第4 行附近出现错误: 查询使用值表达式作为过滤条件 at Dm.DmCommand.do_ExecuteDbDataReader(CommandBehavior behavior) at Dm.DmCommand.ExecuteDbDataReader(CommandBehavior behavior) at System.Data.Common.DbCommand.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken) --- End of stack trace from previous location --- at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.AsyncEnumerator.InitializeReaderAsync(AsyncEnumerator enumerator, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Dm.Storage.Internal.DmExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func`4 operation, Func`4 verifySucceeded, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.AsyncEnumerator.MoveNextAsync()
回答 0
暂无回答
扫一扫
联系客服