Base solution for your next web application

Activities of "susan.lombardi"

Hello,

We are in the process of upgrading from 10.5.0 to 12.4 ("ASP.NET ZERO - ASP.NET Core Version" according to the readme).

After getting our .NET solution building and running again post-upgrade, we are now getting exceptions thrown when EF Core bulk extension methods (like dbContext.BulkInsert or dbContext.bulkUpdate, which we use often) are called:

Exception: ERROR_005: The monthly trial period is expired (date: 2023-11-01, version: 7.100.0.3). You can extend your trial by downloading the latest version as the beginning of every month. More information can be found here: https://entityframework-extensions.net/trial


Now, we directly reference the package EFCore.BulkExtensions

  • In the process of upgrading and getting everything running again, it appears the before/after show that we've gone from EFCore.BulkExtensions 5.4.0 to 6.0.3
  • As of early 2023, this package has split licenses and requires a commercial license for large companies (https://github.com/borisdj/EFCore.BulkExtensions/issues/1079)
  • Despite referencing EFCore.BulkExtensions, the actual package that appears to be used internally is Z.EntityFramework.Extensions.EFCore
    • This package is paid, or at the very least needs to be updated monthly to remain "free"
    • This package is what is throwing a licensing error

I found a similar question from a couple years ago at EntityFrameWork Extentions Trial #10457 | Support Center (aspnetzero.com). In it, a Support member said:

ismcagdas created 2 years ago

https://entityframework-extensions.net/ library is a paid library and it is not included in AspNet Zero. https://entityframework-plus.net/ on the other hand is provided by the same company and it is free. We are using this one in AspNet Boilerplate.

But the "Entity Framework Plus" edition you've mentioned (https://entityframework-plus.net/download) mentions that the Enterprise version, which we need and have been using for Bulk Insert/Update/Delete, says "Trial enabled until end of month", which I believe is our issue.


Our questions are:

  • If our ABP project is referencing EFCore.BulkExtensions, then why is Z.EntityFramework.Extensions.EFCore being used - is this expected?
    • Is this because a dependency of Abp.EntityFrameworkCore.EFPlus is Z.EntityFramework.Plus.EFCore ? Should we not have direct references to EFCore.BulkExtensions in our project?
  • In either case, both libraries appear to now be paid - is this expected? If not, how do we use a free edition with our paid ABP license?

This is an issue for us because we want to keep our solution up-to-date with the latest version of ABP for security and features, but this has broken our extensive use of bulk operations in EF Core.

Any assistance is appreciated.

Thanks!

Prerequisites

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

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

If issue related with ABP Framework

  • What is ABP Framework version? 10.5

This was not an issue before our upgrade, but after we upgraded from 9.1 to 10.5 it is an issue. Here are the steps to reproduce:

  1. Log into application using SSO. A provider ID is added to the AbpLoginUsers table
  2. Using admin account, delete the user
  3. User logs into the application again and gets "Internal Error" (see below) because we get the same provider key back for that user and are trying to add that to the AbpLoginUsers table.
ERROR 2021-11-24 11:12:36,753 [53 ] Mvc.ExceptionHandling.AbpExceptionFilter - An error occurred while updating the entries. See the inner exception for details.
Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while updating the entries. See the inner exception for details.
---> Microsoft.Data.SqlClient.SqlException (0x80131904): Cannot insert duplicate key row in object 'dbo.AbpUserLogins' with unique index 'IX_AbpUserLogins_ProviderKey_TenantId'. The duplicate key value is (quIjhGZFWNlG87cGxfx-74_tHkCsLenxh2TWtrgbs_E, 1).
The statement has been terminated.
at Microsoft.Data.SqlClient.SqlCommand.<>c.<ExecuteDbDataReaderAsync>b__169_0(Task`1 result)
at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke() in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/TaskContinuation.cs:line 190
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/ExecutionContext.cs:line 215
--- End of stack trace from previous location ---
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs:line 2352
--- 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.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
ClientConnectionId:658596fa-44ef-4568-af42-2db7bb0269b7
Error Number:2601,State:1,Class:14
--- End of inner exception stack trace ---
at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList`1 entriesToSave, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(DbContext _, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func`4 operation, Func`4 verifySucceeded, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
at Abp.EntityFrameworkCore.AbpDbContext.SaveChangesAsync(CancellationToken cancellationToken)
at Abp.Zero.EntityFrameworkCore.AbpZeroCommonDbContext`3.SaveChangesAsync(CancellationToken cancellationToken)
at Abp.EntityFrameworkCore.Uow.EfCoreUnitOfWork.SaveChangesAsync()
at Stantec.ProjectLifeboat.Web.Controllers.TokenAuthController.RegisterExternalUserAsync(ExternalAuthUserInfo externalLoginInfo) in /build/src/Stantec.ProjectLifeboat.Web.Core/Controllers/TokenAuthController.cs:line 608
at Stantec.ProjectLifeboat.Web.Controllers.TokenAuthController.ExternalAuthenticate(ExternalAuthenticateModel model) in /build/src/Stantec.ProjectLifeboat.Web.Core/Controllers/TokenAuthController.cs:line 495
at lambda_method5244(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, 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 isCom
Showing 1 to 2 of 2 entries