Hi, After upgrading to newer version 8.0, getting an error in all menu which is generated with the RAD tool before.
ERROR 2019-11-14 15:04:01,086 [16 ] Mvc.ExceptionHandling.AbpExceptionFilter - The LINQ expression 'OrderBy<Currency, int>(
source: Where<Currency>(
source: Where<Currency>(
source: DbSet<Currency>,
predicate: (c) => !(((ISoftDelete)c).IsDeleted) || ((ISoftDelete)c).IsDeleted != (Unhandled parameter: __ef_filter__IsSoftDeleteFilterEnabled_0)),
predicate: (c) => (Nullable<int>)c.Id != (Unhandled parameter: __ou_CurrencyId_0)),
keySelector: (c) => (Unhandled parameter: __ObjectMapper_1).Map<CurrencyDto>(c).Id)' could not be translated. Either rewrite the query in a form that can be translated, or switch to client evaluation explicitly by inserting a call to either AsEnumerable(), AsAsyncEnumerable(), ToList(), or ToListAsync(). See
https://go.microsoft.com/fwlink/?linkid=2101038
for more information.
System.InvalidOperationException: The LINQ expression 'OrderBy<Currency, int>(
source: Where<Currency>(
source: Where<Currency>(
source: DbSet<Currency>,
predicate: (c) => !(((ISoftDelete)c).IsDeleted) || ((ISoftDelete)c).IsDeleted != (Unhandled parameter: __ef_filter__IsSoftDeleteFilterEnabled_0)),
predicate: (c) => (Nullable<int>)c.Id != (Unhandled parameter: __ou_CurrencyId_0)),
keySelector: (c) => (Unhandled parameter: __ObjectMapper_1).Map<CurrencyDto>(c).Id)' could not be translated. Either rewrite the query in a form that can be translated, or switch to client evaluation explicitly by inserting a call to either AsEnumerable(), AsAsyncEnumerable(), ToList(), or ToListAsync(). See
https://go.microsoft.com/fwlink/?linkid=2101038
for more information.
at Microsoft.EntityFrameworkCore.Query.QueryableMethodTranslatingExpressionVisitor.<VisitMethodCall>g__CheckTranslated|8_0(ShapedQueryExpression translated, <>c__DisplayClass8_0& )
at Microsoft.EntityFrameworkCore.Query.QueryableMethodTranslatingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression)
at Microsoft.EntityFrameworkCore.Query.QueryableMethodTranslatingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression)
at Microsoft.EntityFrameworkCore.Query.QueryableMethodTranslatingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression)
at Microsoft.EntityFrameworkCore.Query.QueryableMethodTranslatingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression)
at Microsoft.EntityFrameworkCore.Query.QueryCompilationContext.CreateQueryExecutor[TResult](Expression query)
at Microsoft.EntityFrameworkCore.Storage.Database.CompileQuery[TResult](Expression query, Boolean async)
at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.CompileQueryCore[TResult](IDatabase database, Expression query, IModel model, Boolean async)
at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.<>c__DisplayClass12_0
1.<ExecuteAsync>b__0()
at Microsoft.EntityFrameworkCore.Query.Internal.CompiledQueryCache.GetOrAddQueryCore[TFunc](Object cacheKey, Func1 compiler)
at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.ExecuteAsync[TResult](Expression query, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryProvider.ExecuteAsync[TResult](Expression expression, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryable
1.GetAsyncEnumerator(CancellationToken cancellationToken)
at System.Runtime.CompilerServices.ConfiguredCancelableAsyncEnumerable1.GetAsyncEnumerator()
at Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions.ToListAsync[TSource](IQueryable
1 source, CancellationToken cancellationToken)
at ioNob.h2oERP.Base.CurrenciesAppService.GetAll(GetAllCurrenciesInput input) in D:\GitRepo\h2oERPZero\aspnet-core\src\ioNob.h2oERP.Application\Base\CurrenciesAppService.cs:line 82
at lambda_method(Closure , Object )
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask1 actionResultValueTask)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
Raising error from these sections in service.
var currencies = await query
.OrderBy(input.Sorting ?? "currency.id asc")
.PageBy(input)
.ToListAsync();
Anythings needs to be changed?
Thanks.
31 Answer(s)
-
0
Hello,
<span class="colour" style="color: rgb(85, 85, 85);">Does this happen for the newly generated pages ?</span>
Yes, tried with a newly generated view, but that view also has the same problem.
public async Task<PagedResultDto<GetTestForViewDto>> GetAll(GetAllTestsInput input) { var filteredTests = _testRepository.GetAll() .Include( e => e.CostCenterFk) .WhereIf(!string.IsNullOrWhiteSpace(input.Filter), e => false || e.test1.Contains(input.Filter) || e.test2.Contains(input.Filter)) .WhereIf(!string.IsNullOrWhiteSpace(input.test1Filter), e => e.test1.ToLower() == input.test1Filter.ToLower().Trim()) .WhereIf(!string.IsNullOrWhiteSpace(input.test2Filter), e => e.test2.ToLower() == input.test2Filter.ToLower().Trim()) .WhereIf(input.Mintest3Filter != null, e => e.test3 >= input.Mintest3Filter) .WhereIf(input.Maxtest3Filter != null, e => e.test3 <= input.Maxtest3Filter) .WhereIf(!string.IsNullOrWhiteSpace(input.CostCenterNameFilter), e => e.CostCenterFk != null && e.CostCenterFk.Name.ToLower() == input.CostCenterNameFilter.ToLower().Trim()); var pagedAndFilteredTests = filteredTests .OrderBy(input.Sorting ?? "id asc") .PageBy(input); var tests = from o in pagedAndFilteredTests join o1 in _lookup_costCenterRepository.GetAll() on o.CostCenterId equals o1.Id into j1 from s1 in j1.DefaultIfEmpty() select new GetTestForViewDto() { Test = new TestDto { test1 = o.test1, test2 = o.test2, test3 = o.test3, Id = o.Id }, CostCenterName = s1 == null ? "" : s1.Name.ToString() }; var totalCount = await filteredTests.CountAsync(); return new PagedResultDto<GetTestForViewDto>( totalCount, await tests.ToListAsync() ); }
Noticed that getting the error in the join section.
join o1 in _lookup_costCenterRepository.GetAll() on o.CostCenterId equals o1.Id into j1
Error details from error log:
ERROR 2019-11-15 09:26:31,077 [56 ] Mvc.ExceptionHandling.AbpExceptionFilter - The LINQ expression 'Where<CostCenter>( source: DbSet<CostCenter>, predicate: (c) => Contains<long>( source: (Unhandled parameter: __ef_filter__AssociatedOuIds_2), value: ((IMustHaveOrganizationUnit)c).OrganizationUnitId) || (Nullable<long>)((IMustHaveOrganizationUnit)c).OrganizationUnitId == (Unhandled parameter: __ef_filter__CurrentOUId_3) == (Unhandled parameter: __ef_filter__IsOUFilterEnabled_4) && !(((ISoftDelete)c).IsDeleted) || ((ISoftDelete)c).IsDeleted != (Unhandled parameter: __ef_filter__IsSoftDeleteFilterEnabled_5) && ((IMayHaveTenant)c).TenantId == (Unhandled parameter: __ef_filter__CurrentTenantId_6) || ((IMustHaveTenant)c).TenantId == 0 == (Unhandled parameter: __ef_filter__IsMustHaveTenantFilterEnabled_7))' could not be translated. Either rewrite the query in a form that can be translated, or switch to client evaluation explicitly by inserting a call to either AsEnumerable(), AsAsyncEnumerable(), ToList(), or ToListAsync(). See https://go.microsoft.com/fwlink/?linkid=2101038 for more information. System.InvalidOperationException: The LINQ expression 'Where<CostCenter>( source: DbSet<CostCenter>, predicate: (c) => Contains<long>( source: (Unhandled parameter: __ef_filter__AssociatedOuIds_2), value: ((IMustHaveOrganizationUnit)c).OrganizationUnitId) || (Nullable<long>)((IMustHaveOrganizationUnit)c).OrganizationUnitId == (Unhandled parameter: __ef_filter__CurrentOUId_3) == (Unhandled parameter: __ef_filter__IsOUFilterEnabled_4) && !(((ISoftDelete)c).IsDeleted) || ((ISoftDelete)c).IsDeleted != (Unhandled parameter: __ef_filter__IsSoftDeleteFilterEnabled_5) && ((IMayHaveTenant)c).TenantId == (Unhandled parameter: __ef_filter__CurrentTenantId_6) || ((IMustHaveTenant)c).TenantId == 0 == (Unhandled parameter: __ef_filter__IsMustHaveTenantFilterEnabled_7))' could not be translated. Either rewrite the query in a form that can be translated, or switch to client evaluation explicitly by inserting a call to either AsEnumerable(), AsAsyncEnumerable(), ToList(), or ToListAsync(). See https://go.microsoft.com/fwlink/?linkid=2101038 for more information. at Microsoft.EntityFrameworkCore.Query.QueryableMethodTranslatingExpressionVisitor.<VisitMethodCall>g__CheckTranslated|8_0(ShapedQueryExpression translated, <>c__DisplayClass8_0& ) at Microsoft.EntityFrameworkCore.Query.QueryableMethodTranslatingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression) at Microsoft.EntityFrameworkCore.Query.RelationalQueryableMethodTranslatingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression) at Microsoft.EntityFrameworkCore.Query.QueryableMethodTranslatingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression) at Microsoft.EntityFrameworkCore.Query.RelationalQueryableMethodTranslatingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression) at Microsoft.EntityFrameworkCore.Query.QueryableMethodTranslatingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression) at Microsoft.EntityFrameworkCore.Query.RelationalQueryableMethodTranslatingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression) at Microsoft.EntityFrameworkCore.Query.QueryCompilationContext.CreateQueryExecutor[TResult](Expression query) at Microsoft.EntityFrameworkCore.Storage.Database.CompileQuery[TResult](Expression query, Boolean async) at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.CompileQueryCore[TResult](IDatabase database, Expression query, IModel model, Boolean async) at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.<>c__DisplayClass12_0`1.<ExecuteAsync>b__0() at Microsoft.EntityFrameworkCore.Query.Internal.CompiledQueryCache.GetOrAddQueryCore[TFunc](Object cacheKey, Func`1 compiler) at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.ExecuteAsync[TResult](Expression query, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryProvider.ExecuteAsync[TResult](Expression expression, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryable`1.GetAsyncEnumerator(CancellationToken cancellationToken) at System.Runtime.CompilerServices.ConfiguredCancelableAsyncEnumerable`1.GetAsyncEnumerator() at Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions.ToListAsync[TSource](IQueryable`1 source, CancellationToken cancellationToken) at ioNob.h2oERP.Tes.TestsAppService.GetAll(GetAllTestsInput input) in D:\GitRepo\h2oERPZero\aspnet-core\src\ioNob.h2oERP.Application\Tes\TestsAppService.cs:line 71 at lambda_method(Closure , Object ) at Microsoft.Extensions.Internal.ObjectMethodExecutorAwaitable.Awaiter.GetResult() at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
One more thing I need to add that, we extended DbContext filter section for filtering OU and associated OU to filter data as the user should not see any data who don't have permission on particular OU, so data should be filtered based on listed OU Ids.
protected override Expression<Func<TEntity, bool>> CreateFilterExpression<TEntity>() { var expression = base.CreateFilterExpression<TEntity>(); expression = null; if (typeof(IMayHaveOrganizationUnit).IsAssignableFrom(typeof(TEntity))) { Expression<Func<TEntity, bool>> mayHaveOUFilter = e => AssociatedOuIds.Contains((long)((IMayHaveOrganizationUnit)e).OrganizationUnitId) || (((IMayHaveOrganizationUnit)e).OrganizationUnitId == CurrentOUId) == IsOUFilterEnabled; expression = expression == null ? mayHaveOUFilter : CombineExpressions(expression, mayHaveOUFilter); } if (typeof(IMustHaveOrganizationUnit).IsAssignableFrom(typeof(TEntity))) { Expression<Func<TEntity, bool>> mayHaveOUFilter = e => AssociatedOuIds.Contains(((IMustHaveOrganizationUnit)e).OrganizationUnitId) || (((IMustHaveOrganizationUnit)e).OrganizationUnitId == CurrentOUId) == IsOUFilterEnabled; expression = expression == null ? mayHaveOUFilter : CombineExpressions(expression, mayHaveOUFilter); }
We are stuck here and quick support will be helpful to move with.
Thank You.
-
0
hi @mujthabagroad Can you reproduce this problem using the Zero demo project?
If you can, please share the code, I will download and check it out as quickly as possible. [email protected]
-
0
Hi @maliming
I shared the code, kindly check and assist us. also, I can see some DEBUG lines in thelog file which is accumulating.
DEBUG 2019-11-19 11:55:11,425 [4 ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null DEBUG 2019-11-19 11:55:16,435 [35 ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null DEBUG 2019-11-19 11:55:21,453 [12 ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null DEBUG 2019-11-19 11:55:26,465 [22 ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null DEBUG 2019-11-19 11:55:31,468 [13 ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null DEBUG 2019-11-19 11:55:36,480 [24 ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null DEBUG 2019-11-19 11:55:41,483 [4 ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null DEBUG 2019-11-19 11:55:46,500 [35 ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null DEBUG 2019-11-19 11:55:51,519 [12 ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null DEBUG 2019-11-19 11:55:56,533 [13 ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null DEBUG 2019-11-19 11:56:01,536 [14 ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null DEBUG 2019-11-19 11:56:06,553 [24 ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null DEBUG 2019-11-19 11:56:11,583 [4 ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null DEBUG 2019-11-19 11:56:16,583 [35 ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null DEBUG 2019-11-19 11:56:21,600 [24 ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null DEBUG 2019-11-19 11:56:26,604 [13 ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null DEBUG 2019-11-19 11:56:31,606 [24 ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null DEBUG 2019-11-19 11:56:36,609 [4 ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null DEBUG 2019-11-19 11:56:41,620 [13 ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null DEBUG 2019-11-19 11:56:46,624 [35 ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null DEBUG 2019-11-19 11:56:51,638 [40 ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null DEBUG 2019-11-19 11:56:56,645 [4 ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null DEBUG 2019-11-19 11:57:01,658 [24 ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null DEBUG 2019-11-19 11:57:06,673 [40 ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null DEBUG 2019-11-19 11:57:11,681 [40 ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null DEBUG 2019-11-19 11:57:16,685 [35 ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null DEBUG 2019-11-19 11:57:21,690 [24 ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null DEBUG 2019-11-19 11:57:26,698 [13 ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null DEBUG 2019-11-19 11:57:31,700 [35 ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null DEBUG 2019-11-19 11:57:36,713 [40 ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null DEBUG 2019-11-19 11:57:41,716 [24 ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null DEBUG 2019-11-19 11:57:46,719 [40 ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null DEBUG 2019-11-19 11:57:51,723 [40 ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null DEBUG 2019-11-19 11:57:56,731 [12 ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null DEBUG 2019-11-19 11:58:01,738 [4 ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null DEBUG 2019-11-19 11:58:06,745 [40 ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null DEBUG 2019-11-19 11:58:11,749 [35 ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null DEBUG 2019-11-19 11:58:16,751 [13 ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null DEBUG 2019-11-19 11:58:21,765 [4 ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null DEBUG 2019-11-19 11:58:26,777 [12 ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null DEBUG 2019-11-19 11:58:31,793 [42 ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null DEBUG 2019-11-19 11:58:36,798 [40 ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null DEBUG 2019-11-19 11:58:41,802 [40 ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null DEBUG 2019-11-19 11:58:46,803 [42 ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null DEBUG 2019-11-19 11:58:51,806 [42 ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null DEBUG 2019-11-19 11:58:56,810 [40 ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null DEBUG 2019-11-19 11:59:01,815 [35 ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null DEBUG 2019-11-19 11:59:06,825 [40 ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null DEBUG 2019-11-19 11:59:11,829 [40 ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null DEBUG 2019-11-19 11:59:16,834 [4 ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null DEBUG 2019-11-19 11:59:21,840 [35 ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null DEBUG 2019-11-19 11:59:26,845 [4 ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
-
0
Hi @maliming This error is not related to that I guess, error log also shows that related to client evaluation, I removed all as you instructed and tried, still have the same issue. This is the error log.
The LINQ expression 'OrderBy<Currency, int>( source: Where<Currency>( source: Where<Currency>( source: DbSet<Currency>, predicate: (c) => !(((ISoftDelete)c).IsDeleted) || ((ISoftDelete)c).IsDeleted != (Unhandled parameter: __ef_filter__IsSoftDeleteFilterEnabled_0)), predicate: (c) => (Nullable<int>)c.Id != (Unhandled parameter: __ou_CurrencyId_0)), keySelector: (c) => (Unhandled parameter: __ObjectMapper_1).Map<CurrencyDto>(c).Id)' could not be translated. Either rewrite the query in a form that can be translated, or switch to client evaluation explicitly by inserting a call to either AsEnumerable(), AsAsyncEnumerable(), ToList(), or ToListAsync(). See https://go.microsoft.com/fwlink/?linkid=2101038 for more information. System.InvalidOperationException: The LINQ expression 'OrderBy<Currency, int>( source: Where<Currency>( source: Where<Currency>( source: DbSet<Currency>, predicate: (c) => !(((ISoftDelete)c).IsDeleted) || ((ISoftDelete)c).IsDeleted != (Unhandled parameter: __ef_filter__IsSoftDeleteFilterEnabled_0)), predicate: (c) => (Nullable<int>)c.Id != (Unhandled parameter: __ou_CurrencyId_0)),
Can go through this issue, seems similar to me. https://github.com/aspnetboilerplate/aspnetboilerplate/issues/4946
Thanks.
-
0
Hi maliming,
The issue still there, we checked the view which doesn't have Tenant filter and IsDeleted filter. can you check it again?. We extended dbcontext for filters and raising an error on that. it is working fine when we comment that expressions. I posted the expressions above. we had done these changes based on documentation https://aspnetboilerplate.com/Pages/Documents/Articles\How-To\add-custom-data-filter-ef-core?searchKey=custom%20filters
Thanks.
-
0
I am having very similar issues on all my custom services after the upgrade to 8.0.0 and haven't figured out what the true issue is. @mujthabagroad I am not following how you fixed it. Can you give me any advice?
I have having issues in almost every service. But I can give an example below of one query that is causing an issue that didn't before the .NET Core 3 update. If I remove the "&& DateTime.Compare(Clock.Now, a.StartDateTime) > 0" it then seems to work. SO it seems like a simular issue to https://github.com/aspnetboilerplate/aspnetboilerplate/issues/5026#issuecomment-554157095 talking about here.
var numberOfAppointments = await _appointmentRepository.GetAll() .Where(a => a.UserId == user.Id && DateTime.Compare(Clock.Now, a.StartDateTime) > 0).CountAsync();
-
0
-
0
Has this problem been solved? We are about to proceed with full-scale development of our new ASP.NET Zero project. The split .NET Core 3.0 Host/Angular 8 solution which I downloaded about two weeks ago, verified and uploaded to our repo has started throwing this same error message "HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null". This happens when I code gen an entity from the database into the solution and try to navigate to the entity's index view while running. We also tested this on another developer machine which also was working before and also with a freshly download solution from ASP.NET Zero. We are completely blocked from starting development. We have two days left in our 30 day money-back guarantee period and we are contemplating our options moving forward given this showstopper issue along with all the other bugs, flaws and difficulties we have previously reported.
-
0
verified and uploaded to our repo has started throwing this same error message "HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null".
This is just a DEBUG log for information purposes. This log will be removed with the next version.