<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:37:45 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[CSHARP-761] Allow LINQ lambda expressions to be used for queries in .Remove and .Update operations</title>
                <link>https://jira.mongodb.org/browse/CSHARP-761</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;The Query and Query&amp;lt;T&amp;gt; API&apos;s that we have to use for Update and Remove operations are pretty verbose and annoying to work with. It would be great to be able to use lambda expressions instead.&lt;/p&gt;

&lt;p&gt;E.g. instead of&lt;/p&gt;

&lt;p&gt;coll.Update(Query.Or(Query.EQ(&quot;Id&quot;, &quot;...&quot;), Query.EQ(&quot;Name&quot;, &quot;John&quot;)), update)&lt;/p&gt;

&lt;p&gt;we could do&lt;/p&gt;

&lt;p&gt;coll.Update(o =&amp;gt; o.Id == &quot;...&quot; || o.Name == &quot;John&quot;, update)&lt;/p&gt;

&lt;p&gt;Same for Remove.&lt;/p&gt;

&lt;p&gt;Pull request is on it&apos;s way... &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</description>
                <environment></environment>
        <key id="79048">CSHARP-761</key>
            <summary>Allow LINQ lambda expressions to be used for queries in .Remove and .Update operations</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="9">Done</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="eeg@trustpilot.com">Einar Egilsson</reporter>
                        <labels>
                            <label>linq</label>
                            <label>remove</label>
                            <label>update</label>
                    </labels>
                <created>Fri, 14 Jun 2013 07:34:38 +0000</created>
                <updated>Thu, 20 Mar 2014 14:37:08 +0000</updated>
                            <resolved>Fri, 14 Jun 2013 13:01:38 +0000</resolved>
                                                                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="360204" author="craiggwilson" created="Fri, 14 Jun 2013 13:01:38 +0000"  >&lt;p&gt;An extension method is easy enough to write, so if you would like something like this, feel free to write one.  We are currently going through a bit of a redesign of the CRUD syntax for all the drivers and so we&apos;ll definitely keep this in mind during that discussion...&lt;/p&gt;

&lt;p&gt;Thanks for your input!!!&lt;/p&gt;</comment>
                            <comment id="360073" author="eeg@trustpilot.com" created="Fri, 14 Jun 2013 07:44:29 +0000"  >&lt;p&gt;Totally missed that! &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt; OK then, just close this issue. Although I still think it would be nice to have an extension method that took the lambda expression in directly.&lt;/p&gt;</comment>
                            <comment id="360071" author="rstam" created="Fri, 14 Jun 2013 07:38:08 +0000"  >&lt;p&gt;This is already possible. You can do it like this:&lt;/p&gt;

&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;collection.Update(Query&amp;lt;T&amp;gt;.Where(o =&amp;gt; predicate(o)), update);&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrr5en:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>72233</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>