burnt1ce
burnt1ce

Reputation: 14897

Linq: How to verify dbcontext.SubmitChanges() for updates/inserts succeeded?

How do you verify that SubmitChanges() worked for inserts and updates? The method doesn't return a bool or int value.

Upvotes: 0

Views: 930

Answers (1)

jrummell
jrummell

Reputation: 43077

If an insert fails it will throw a SqlException. I think it may do the same for failed updates.

Upvotes: 1

Related Questions