Hello Jiri,

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?

Thanks

Niko

-----Ursprüngliche Nachricht-----
Von: Jiří Činčura [mailto:j...@cincura.net] 
Gesendet: Dienstag, 13. September 2016 18:22
An: firebird-net-provider@lists.sourceforge.net
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.

--
Mgr. Jiří Činčura
Independent IT Specialist

------------------------------------------------------------------------------
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider


------------------------------------------------------------------------------
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to