What's the best practice way to enforce a unique constraint (on an email address for example) when inserting (or updating) a user record in dapper?
To prevent a race condition I am guessing you would just try the insert and let SQL Server return an error if the constraint was violated - then handle that? I can find no examples of how to do this using Dapper - or any thoughts on best practice?
thx.