-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add InteractionScope attribute. #10
Comments
@mtornwall what i found here:
(I decided to clarify this without sending the code because the changes doesn't seems to be very big.) What do you think, should we return to the manage of the transaction scoping outside the I did not participate in discussions on the latest changes in this library, so it’s difficult for me to be sure of any of the solutions. |
Not quite what I had in mind, but maybe we can simplify it to:
WDYT? |
@mtornwall, yeah, sound good for me, thank you for clarification. |
As I understand it the transaction scope management in Anyway, what I think we should have is:
WDYT? |
@mtornwall, alright i agree with your guess regarding |
We were discussing the last step which is consists of testing the newly released 0.8.0 version (https://www.nuget.org/packages/Starcounter.Startup/0.8.0) in all apps and updating them then and @mtornwall suggested to assign this action to him. |
Was initially reported by @mtornwall:
Startup has attribute
[UseDbScope]
which is used to say whether view model should be wrapped in Db.Scope or not. So[UseDbScope(false)]
=> not wrapped in scope and vice versa.But the behavior of
Db.Scope()
is such that if there already is a scope allocated for an outer view model (or blended view model, IIRC), no new scope will be created for the nested view model. Instead it will be folded into the outer scope. However, sometimes you want to explicitly request that a new Db.Scope() be created. This could be done withnew Transaction(....).Scope(() => ...)
I would like a new attribute, with options such as:
Where their meaning would be:
•
None
=> view model should not be attached to any scope•
Create
only => view model should always get a new scope as above•
Attach
only => view model should attach to existing scope, if any, but not create one•
Create | Attach
=> view model should attach to existing scope if any, otherwise create a new oneThe text was updated successfully, but these errors were encountered: