c# - Handling errors during Entity Framework database operations -
i want handle errors such foreign-key violations during entity framework database operations. so, when user updates, inserts, or deletes record using framework, want catch sql errors , show them cleaner, readable error message. currently, without error handling, application left in broken state , error message pops long, specific stacktrace.
i have had trouble finding clean solution problem. appreciated!
also, i'm using entity framework, in combination silverlight , wcf data services.
the common solution write try/catch in code. or use generic repository pattern suggested in following link -
Comments
Post a Comment