I am using EF 6 as my ORM. I am trying to decide how to handle CRUD failures.
Use exceptions (custom or built-in) to inform the web layer that an item didn't correctly save. Handle the exceptions at the Web Layer as either error messages to the user or to trigger an AJAX post to try again depending on the reason for the failure.
Use some sort of object as a wrapper for CRUD operations. Return an enum and a message. Writer an object parser at the Web Layer as either error messages to the user or to trigger an AJAX post to try again depending on the reason for the failure.
I am also open to other ideas. These are the two that I have come up with.
I am using DB first on a legacy database. This database structure is poor at the very best. The current way issues are handled, is by returning an object that holds an enum and message. The majority of the applications hitting the database is used in winform apps. I just happen to be writing the web applications that hit them.