PawelGerr/Thinktecture.EntityFrameworkCore

Ignore on update

mbendtsen opened this issue · 3 comments

Is it possible to ignore update? I only want to insert if not exists.

context.BulkInsertOrUpdateAsync(
   readingToStore, 
   propertiesToMatchOn: x => new { x.Timestamp, x.Obis, x.Value, x.DeviceId }, 
   cancellationToken: cancellationToken);

Please update the lib to 4.0.0-beta03 and let the property propertiesToUpdate provide 0 properties explicitly.

await ctx.BulkInsertOrUpdateAsync(
   readingToStore,
   ...,
   propertiesToUpdate: x => new { }); 

// or
await ctx.BulkInsertOrUpdateAsync(
   readingToStore,
   new SqlServerBulkInsertOrUpdateOptions {  PropertiesToUpdate = EntityPropertiesProvider.Empty }); 

Thanks. When will it come out of beta?

I planning to make a release until the of this year but there is no guarantee.