EFCore.BulkExtensions icon indicating copy to clipboard operation
EFCore.BulkExtensions copied to clipboard

BulkInsertOrUpdateAsync not updating the entity with the existing or new Ids.

Open rdasgupta7141 opened this issue 1 year ago • 0 comments

var bulkConfig = new BulkConfig { SetOutputIdentity = true, PropertiesToExclude = new List { nameof(Entity.DocumentId) }, UpdateByProperties = new List { nameof(Entity.FADNumber) } }; await _context.BulkInsertOrUpdateAsync(entityList, bulkConfig);

BulkInsertOrUpdateAsync is NOT updating the entityList with the new or matching Entity.Id after we upgraded to EF7.1.4.

Now we have to make a bulkReadAsync call to get all the ids. Is there a new setting we need to turn on to get the ids with BulkInsertOrUpdateAync call. Please note I was able to see the entitylist getting populated with Ids before the upgrade to E7.1.4 with just BulkInsertOrUpdateAsync call

rdasgupta7141 avatar Oct 30 '23 20:10 rdasgupta7141