Base solution for your next web application

Activities of "mujthabagroad"

Yes, the issue is there on newly downloaded app package. Steps to reproduce:

  1. Create View with RAD Tool with reference to any other table
  2. Goto menu and try to load CRUD view or Lookup in add new.

I will share this test solution via mail as well.

Hi @maliming Can you take remote access and check, i sent access details to your email.

Thanks.

Hi,

I generated a new view with RAD Tool to check the issue as instructed. but raising the same error in GetAll function. Getting this error while loading all CRUD views.

Thanks.

Hello,

Waiting for the support as we coultdn't resolve it.

Thanks.

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.&lt;ExecuteAsync&gt;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.&lt;InvokeActionMethodAsync&gt;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.

Yes. There was an error and removed those and tried. But no luck.

EntityFrameworkCore.csproj(73,3): error MSB4019: The imported project "C:\Program Files\dotnet\sdk\2.2.401\Microsoft\VisualStudio\v16.0\SSDT\Microsoft.Data.Tools.Schema.Sql.UnitTesting.targets" was not found. Confirm that the path in the &lt;Import> declaration is correct, and that the file exists on disk.

The build failed. Please fix the build errors and run again.

Removed a line from project file and tried to run the app. But still the same issue. Sometimes getting another error as

This happens only in a single pc. Tried to reinstall the VS, But no luck.

Thanks.

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_01.<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.EntityQueryable1.GetAsyncEnumerator(CancellationToken cancellationToken)    at System.Runtime.CompilerServices.ConfiguredCancelableAsyncEnumerable1.GetAsyncEnumerator()    at Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions.ToListAsync[TSource](IQueryable1 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.

Hello,

While running the application getting an error says that An error occurred launching IIS Express, I know this is not related to ASPZERO. I tried many ways and I couldn't resolve it. Using aspzero v7.3. Installed dotnet Core 2.2 SDK and Hosting bundles. Anybody can help?.

Thanks.

Hi maliming,

Thanks for your support, it worked,

Should I upgrade "moment-timezone": "^0.5.25" to "^0.5.27" ?

Hi maliming,

I shared the code, please have a look.

Thanks.

Showing 11 to 20 of 59 entries