Thinktecture.EntityFrameworkCore
Thinktecture.EntityFrameworkCore copied to clipboard
Unable to exclude shadow properties from bulk updates
Hello, I have been using the BulkInsertOrUpdateAsync method on a project and for the most part it works great!
I have come across one snag however where I have a shadow property on my entity (which is actually an identity property and therefore cannot be inserted or updated).
Since the IEntityPropertiesProvider.Exclude<T> method takes in a projection, I could not find a way to provide a shadow property which doesn't exist on the entity class to the exclude.
Is there a way around this or could this be added?
Thanks!
Hi, you can implement IEntityPropertiesProvider to get full control over what properties should be inserted/updated.
The class ExcludingEntityPropertiesProvider would be a good starting point.