Linq: How to verify dbcontext.SubmitChanges() for updates/inserts succeeded?
-
16-09-2019 - |
Question
How do you verify that SubmitChanges() worked for inserts and updates? The method doesn't return a bool or int value.
Solution
If an insert fails it will throw a SqlException. I think it may do the same for failed updates.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow