You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BulkInsert doesn't work with the inmemory provider. This used to work on the following.
dotnet8
Microsoft.EntityFrameworkCore.InMemory:8.0.10
Z.EntityFramework.Extensions.EFCore:8.103.6
One of my unit tests is calling a service which uses bulkInsert and now is failing with the exception below.
To replicate, I just followed this example (https://entityframework-extensions.net/efcore-inmemory-provider) using the latest packages as listed above but using the BulkInsert instead.
If this isn't supported anymore, please advise on how to resolve.
Exception
System.InvalidOperationException: The model must be finalized and its runtime dependencies must be initialized before 'GetRelationalModel' can be used. Ensure that either 'OnModelCreating' has completed or, if using a stand-alone 'ModelBuilder', that 'IModelRuntimeInitializer.Initialize(model.FinalizeModel())' was called.
at Microsoft.EntityFrameworkCore.RelationalModelExtensions.GetRelationalModel(IModel model)
at Microsoft.EntityFrameworkCore.Internal.RelationalModelExtensions.EnsureRelationalModel(IModel model)
at Microsoft.EntityFrameworkCore.RelationalTypeBaseExtensions.GetTableMappings(ITypeBase typeBase)
at Z.EntityFramework.Extensions.EntityTypeZInfo.CleanupEntityConstructor()
at Z.EntityFramework.Extensions.EntityTypeZInfo..ctor(IEntityType entityType)
at PublicExtensions..(IEntityType )
at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
at PublicExtensions.ToZInfo(IEntityType entityType)
at .BulkInsert[T](DbContext this, IEnumerable`1 entities, Action`1 options, Boolean isBulkSaveChanges, Boolean isOptimized)
Description
After upgrading to the following
BulkInsert doesn't work with the inmemory provider. This used to work on the following.
One of my unit tests is calling a service which uses bulkInsert and now is failing with the exception below.
To replicate, I just followed this example (https://entityframework-extensions.net/efcore-inmemory-provider) using the latest packages as listed above but using the BulkInsert instead.
If this isn't supported anymore, please advise on how to resolve.
Exception
Fiddle or Project (Optional)
https://dotnetfiddle.net/NCoIGU
The text was updated successfully, but these errors were encountered: