Skip to content
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

Any plans to support transactions? #234

Closed
comfreakph opened this issue Mar 30, 2015 · 5 comments
Closed

Any plans to support transactions? #234

comfreakph opened this issue Mar 30, 2015 · 5 comments

Comments

@comfreakph
Copy link

the current version doesn't support transactions, is there plan for add this to massive?

@FransBouma
Copy link
Owner

It does https://github.com/FransBouma/Massive/blob/master/Massive.cs#L274 but not directly. You want directly defined transactions (like you define: 'start a transaction', then do things (so the actions are all in the transaction), then 'commit transaction' ? ) besides the indirect transaction defined now?

@comfreakph
Copy link
Author

yes direct defined transactions like in EF.
ex:

db.create(model);
db.savechanges();

^_^

@aleblanc70
Copy link

Hello Frans,

The link in your previous post does not work :(

Yep transaction will be great.
So in our code we could update many row and on exception ROLL BACK all.
Thanks!
André

@mikebeaton
Copy link
Contributor

mikebeaton commented Feb 9, 2017

The links:
https://github.com/FransBouma/Massive/blob/v1.0/Massive.cs#L274
https://github.com/FransBouma/Massive/blob/v2.0/src/Massive.Shared.cs#L418
(A somewhat relevant issue, at least for 'roll-your-own' transaction support: #301)

@mikebeaton mikebeaton mentioned this issue Feb 9, 2017
@FransBouma
Copy link
Owner

Massive doesn't have the design to have a Unit of work and a separate transaction requires also a separate connection, which is shared among operations. Massive's design doesn't really support that. It does have internal transactions but no external transaction. If you want that, use a System.Transactions.TransactionScope.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants