Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Upgrading .Net Core 5.0 with Latest ABP #10503


User avatar
0
kansoftware created

Prerequisites

Please answer the following questions before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.

  • What is your product version? 8.1
  • What is your product type (Angular or MVC)? MVC
  • What is product framework type (.net framework or .net core)? .net core

After upgrading to 5.0 we are getting following error:


5 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    You need to change GetCurrentLoginInformations method as shown in this link https://github.com/aspnetzero/aspnet-zero-core/blob/dev/aspnet-core/src/MyCompanyName.AbpZeroTemplate.Application/Sessions/SessionAppService.cs#L40.

    Basically you need to manually create a UnitOfWork using await _unitOfWorkManager.WithUnitOfWorkAsync in the related method.

  • User Avatar
    0
    kansoftware created

    Thanks That worked.

    But, Now We are getting following error at several places Please help

    Request: { "input": { "registrationNumber": "", "registrationDate": "2021-05-17T10:39:11.116Z", "registrationAmount": 1000, "registrationDiscount": 0, "registrationNetAmount": 1000, "requestedDate": "2021-05-17T10:39:11.116Z", "registrationRemark": "", "discountRemark": "", "billingRemark": "", "nextFollowUpDate": "2021-05-17T10:39:11.116Z", "registrationStatusId": 1, "requestedBy": null, "billedBy": null, "registrationDoneBy": null, "patientAccountId": 4386, "assignTypeIdBilling": 1, "userGroupIdBilling": 8, "userIdBilling": 0, "clinicId": 4, "uhid": "${uhid)", "fileCreationId": null, "opdId": null, "tokenHdrId": null, "opdNumber": "", "opdDate": "2021-05-17T10:39:11.116Z", "tokenNumber": "", "registrationStatusName": "Registered", "isBiometricVerified": true, "isImageVerified": true, "biometricVerifiedLogId": null, "imageVerifiedLogId": null, "registrationChargesId": null, "tokenHdrIdBilling": null, "isOldPatient": false, "pA_IsOldPatient": false, "tempId": null, "isFailureApp": false, "id": null } }

    Response:

    System.ArgumentException: must be reducible node at System.Linq.Expressions.Expression.ReduceAndCheck() at System.Linq.Expressions.Expression.ReduceExtensions() at System.Linq.Expressions.Compiler.StackSpiller.RewriteExtensionExpression(Expression expr, Stack stack) at System.Linq.Expressions.Compiler.StackSpiller.RewriteExpression(Expression node, Stack stack) at System.Linq.Expressions.Compiler.StackSpiller.ChildRewriter.Add(Expression expression) at System.Linq.Expressions.Compiler.StackSpiller.ChildRewriter.AddArguments(IArgumentProvider expressions) at System.Linq.Expressions.Compiler.StackSpiller.RewriteMethodCallExpression(Expression expr, Stack stack) at System.Linq.Expressions.Compiler.StackSpiller.RewriteExpression(Expression node, Stack stack) at System.Linq.Expressions.Compiler.StackSpiller.ChildRewriter.Add(Expression expression) at System.Linq.Expressions.Compiler.StackSpiller.ChildRewriter.AddArguments(IArgumentProvider expressions) at System.Linq.Expressions.Compiler.StackSpiller.RewriteMethodCallExpression(Expression expr, Stack stack) at System.Linq.Expressions.Compiler.StackSpiller.RewriteExpression(Expression node, Stack stack) at System.Linq.Expressions.Compiler.StackSpiller.RewriteExpressionFreeTemps(Expression expression, Stack stack) at System.Linq.Expressions.Compiler.StackSpiller.Rewrite[T](Expression1 lambda) at System.Linq.Expressions.Compiler.LambdaCompiler.Compile(LambdaExpression lambda) at System.Linq.EnumerableQuery1.GetEnumerator() at Ksoft.Account.PatientBillingRequestsAppService.Create(CreateOrEditPatientBillingRequestDto input) in D:\Projects\IndiraIVF\branches\Embryology\src\Ksoft.Application\Account\PatientBillingRequestsAppService.cs:line 602 at Abp.Authorization.AuthorizationInterceptor.InternalInterceptAsynchronous[TResult](IInvocation invocation) at Ksoft.Account.PatientBillingRequestsAppService.CreateOrEdit(CreateOrEditPatientBillingRequestDto...

  • User Avatar
    0
    musa.demir created

    Hi @kansoftware

    It seems like it is ef problem. Can you please share the relevant code part?

  • User Avatar
    0
    kansoftware created

    Hi musa.demir

    Please find the code file below:

    http://103.89.253.21:420/PatientBillingRequestsAppService.cs

    Regards, Harshit

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @kansoftware

    I think you need to rewrite your query below;

                var productBillingServiceList = (from pd in input.ProductDetails.AsQueryable()
    
                                                 join p in _lookup_productRepository.GetAll()
                                                 on pd.ProductId equals p.Id
    
                                                 select p.BillingServiceId).Distinct();
    

    You may write it like this;

    _lookup_productRepository.GetAll().Where(e=> input.ProductDetails.Any(p=> p.ProductId == e.Id)).Select(e=> e.BillingServiceId).Distict();