I'm using Dapper a little time and so I have little experience with it. I would like to know if there is any way to detect changes in a specific field.
I need this because in a given table, every time a field is updated, I need to update another field, concatenating with ".JPG".
For example
using Dapper.Contrib.Extensions;
// ...
var remessa = conn.Get<Remessa>(1);
remessa.Campo1 = "5000";
// remessa.Campo2 = remessa.Campo1 + ".jpg";
conn.Update(remessa);
In the example above, I need the commented line for Campo2
to run automatically, every time I run SqlConnection.Update
(that is, I do not want to be repeating this snippet in my application). Can you do this with Dapper?