I know I can use the pure dapper to build my update string with only the properties I want to update (whitelist).
What I want is to keep the ORM style of dapper extensions:
I want that some properties of person are not updated (blacklist)
How can I exlude properties from being updated running the .Update extension method?
Do you maybe know of a better .Update extension in the dapper style? (Then I dont have to
write it ;-)
You can try using a separate class for that (for example, a descendant of Person or a wrapper around it with a separate mapper that ignores the property).
But that is way too ugly to be a good solution.
DapperExtensions currently are way too straightforward for anything except explicit CRUD tasks. I had to develop a custom mapper just to add System.ComponentModel annotations support, which seems ridiculous for 2015.
But adding a new UpdatePartial extension method looks like a nice idea.