-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Db raise exception, commit executed on UnitOfWork dispose #14
Comments
Hi @janstupak I have always had: using(var uow = db.UinitOfWork())
{
try
{
//somehting thows
}
catch(Exception exception)
{
uow.Rollback();
}
} I can add some virutals in the dispose methods if you like. Easier to substitute stuff. |
@janstupak |
"I am a little reluctant to use the runtime, or reflections to find out if there is an exception." try/using ... session to many nested try's by me ... is not very clear ... |
@janstupak I agree with you. I will add the marshel and an option ASAP. |
OK, thanks ... I waiting for new nuget package ... it's not urgent matter |
Hi,
situation:
using session created ... connection open
inner using uow created ... begin transaction
insert
update
insert ... throw exception
dispose on uow call commit ...
insert and update are commited !
this is not good transaction logic ...
good transaction logic by me is "everything or nothing"
my workaround in DbTransaction.cs is little change in DisposeTransaction() method
Jan
The text was updated successfully, but these errors were encountered: