Re: Best practice for Rollback with EF and Firebird
thanks for the fast response.
I still have troubles arround clearing the context after an error happend on the database. I loop through N entities and modify them. The 3rd creates an error on the database which is reported back in an exception. Now the 4th and ongoing context.SaveChanges() will fail with the same error - but without having the problem at all.
In my understanding the error stucks inside the context and I need to clean it up.
Your comment "...is only in database, not in context" indicates that something needs to be done here: But what?
Von: Jiří Činčura [mailto:[hidden email]]
Gesendet: Dienstag, 13. September 2016 18:22
An: [hidden email] Betreff: Re: [Firebird-net-provider] Best practice for Rollback with EF and Firebird
> Is it really neccesssary to get transaction before
> context:SaveChanges() in order to rollback?
Yes, if you want to rollback manually. OTOH if there's an error while processing the data, the rollback is automatic. Also take into account that the transaction is only in database, not in context.