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

Allow MemberInit inside of a conditional expression #230

Merged
merged 1 commit into from
Oct 4, 2015
Merged

Allow MemberInit inside of a conditional expression #230

merged 1 commit into from
Oct 4, 2015

Conversation

nkreipke
Copy link
Contributor

@nkreipke nkreipke commented Oct 2, 2015

It's me again,

this is the last one for now. This one makes it possible to use MemberInit expressions inside of conditional expressions, allowing you to do things like:

query.Update(t => (t.SomeCondition ? new Person { ... } : t))

This is quite handy if you want to update a document only if a condition evaluates to true, I guess it can be handy in other cases as well.

Sorry for the sudden burst of pull requests, I made these changes for a project which is now going to prod and I wanted to make sure everything works before I submit them to you. Thanks for the driver by the way!

Kind regards,
Nico

@mfenniak mfenniak merged commit 45cf985 into mfenniak:master Oct 4, 2015
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

Successfully merging this pull request may close these issues.

2 participants