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
I've just tested out your library as a replacement for the dbcontext.SaveChanges function, but I'm getting an exception:
at EFCore.BulkExtensions.DbContextBulkTransactionSaveChanges.<>c.<SaveChangesAsync>b__2_3(IEntityType e)
at EFCore.BulkExtensions.DbContextBulkTransactionSaveChanges.<>c__DisplayClass2_0.<SaveChangesAsync>b__6(<>f__AnonymousType1`4 g)
at Medallion.Collections.TopologicalSorter.<TopologicalSort>d__0`1.MoveNext()
at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection)
at System.Collections.Generic.List`1.AddRange(IEnumerable`1 collection)
at System.Linq.Enumerable.ConcatIterator`1.ToList()
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at EFCore.BulkExtensions.DbContextBulkTransactionSaveChanges.<SaveChangesAsync>d__2.MoveNext()
at EFCore.BulkExtensions.DbContextBulkTransactionSaveChanges.SaveChanges(DbContext context, BulkConfig bulkConfig, Action`1 progress)
at EFCore.BulkExtensions.DbContextBulkTransaction.Execute[T](DbContext context, Type type, IEnumerable`1 entities, OperationType operationType, BulkConfig bulkConfig, Action`1 progress)
at EFCore.BulkExtensions.DbContextBulkExtensions.BulkSaveChanges(DbContext context, BulkConfig bulkConfig, Action`1 progress)
at VSControls.VSDatabaseManager.SaveProjectToDb(Project Proj, String path) in C:\VitalSim\Vital-Sim-.NET\VSControls\VSDatabaseManager.cs:line 353
My understanding from the documentation is that the function dbcontext.BulkSaveChanges should be a drop-in replacement for dbcontext.SaveChanges. Do you have any suggestions for troubleshooting steps?
The text was updated successfully, but these errors were encountered:
Exact same issue here. I was evaluating to see if we could speed up bulk-inserts in some utilities with this library but it seemed to fall on its face with this.
SaveChanges works fine but using this throws an Object Ref exception
FWIW - I am running .NET 8.0, so perhaps it's an issue with newer .NET release?
Can you make a sample where the issue would be reproducible, code snipped of Entities their Db context config and Insert method. Or to write a test, take a look at existing one for BulkSaveChanges in the project.
Hi,
I've just tested out your library as a replacement for the dbcontext.SaveChanges function, but I'm getting an exception:
My understanding from the documentation is that the function dbcontext.BulkSaveChanges should be a drop-in replacement for dbcontext.SaveChanges. Do you have any suggestions for troubleshooting steps?
The text was updated successfully, but these errors were encountered: