I have an asp.net mvc 5 site.
I have a places table / POCO with 3 unique constraints (URL, Email & obviously ID).
Users are able to add places - but they may violate URL or Email unique constraints, and I need to tell them why an insert failed.
I am tempted to just let the insert fail (by violating the Unique Constraint in the database).
I could do multiple round trips to the database to check for uniqueness - but that is slower, more work - and in theory creates a (very unlikely) race condition.
I would also like to tell the user (ideally avoiding technical error messages) - that URL - or Email - needs to be unique.
What is best practice here? What is quick & efficient? I am not using stored procedures on this site (instead parameterised sql via dapper.net) - and I would like to avoid sprocs but maybe thats the best way?