Open tien199013 opened 3 years ago
Hello @tien199013 ,
Unfortunately, we have disabled the support of IncludeGraph
for InMemory
provider.
The problem happens due to how the context works under the hood for the InMemory
provider. We will eventually re-work the IncludeGraph
feature to stop using some EF Core method but for now, there is nothing we can do since that's not a quick fix and a lot of big development is already ongoing on this library to better support EF Core 5.
Best Regards,
Jon
HI, is there any further development regarding the problem with IncludeGraph and the InMemory Db provider ?
Best Regards, Rico
Hello @daxstar83 ,
Unfortunately there is currently no progress
What is the latest EF Plus version where this was supported? Do you have any timeline when this can be expected?
Description
When adding unit tests for a business logic where touching
BulkMerge
withIncludeGraph
feature, we got the following exceptions. Surprisingly, the production code works and behaves as what we expected. However, in the unit tests stage where we using the EF core's in memory database it failed.Exception
If you are seeing an exception, include the full exceptions details (message and stack trace). System.Exception: Oops! The 'IncludeGraph' feature doesn't work with 'BulkUpdate' and 'BulkMerge' NMemory provider. at .(DbContext this, Action
1 , DbContext ) at DbContextExtensions.(DbContext this, Action
1 , DbContext ) at .BulkMerge[T](DbContext this, IEntityType entityType, IEnumerable1 list, Action
1 options, Boolean forceSpecificTypeMapping) at .BulkMerge[T](DbContext this, IEnumerable1 entities, Action
1 options) at DbContextExtensions.BulkMerge[T](DbContext this, IEnumerable1 entities, Action
1 options) at DbContextExtensions.1.() at System.Threading.Tasks.Task.InnerInvoke() at System.Threading.Tasks.Task.<>c.<.cctor>b__274_0(Object obj) at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location where exception was thrown --- at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) --- End of stack trace from previous location where exception was thrown --- at DbContextExtensions.BulkMergeAsync[T](DbContext this, IEnumerable
1 entities, Action`1 options, CancellationToken cancellationToken)Example code
Further technical details