<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:43:19 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-2706] Add AsQueryable to IMongoDbCollection rather than as an extension method.</title>
                <link>https://jira.mongodb.org/browse/CSHARP-2706</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;Linq will &quot;discover&quot; and use the AsQueryable interface if it is not defined as extension method.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</description>
                <environment></environment>
        <key id="905206">CSHARP-2706</key>
            <summary>Add AsQueryable to IMongoDbCollection rather than as an extension method.</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</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="13202">Works as Designed</resolution>
                                        <assignee username="robert@mongodb.com">Robert Stam</assignee>
                                    <reporter username="rcollette@yahoo.com">Richard Collette</reporter>
                        <labels>
                    </labels>
                <created>Fri, 23 Aug 2019 20:06:29 +0000</created>
                <updated>Fri, 27 Oct 2023 13:24:55 +0000</updated>
                            <resolved>Sat, 19 Oct 2019 12:57:29 +0000</resolved>
                                                                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="2491072" author="rstam" created="Sat, 19 Oct 2019 12:57:29 +0000"  >&lt;p&gt;I think the current design is appropriate because:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Calling AsQueryable explicitly is a clean API point to provide additional arguments&lt;/li&gt;
	&lt;li&gt;It provides a clean separation between a the driver collection API and the LINQ API&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;I appreciate that there would be a small convenience to being able to omit the call to AsQueryable, but for now at least we&apos;re going to not change this.&lt;/p&gt;</comment>
                            <comment id="2433520" author="rstam" created="Wed, 25 Sep 2019 20:22:53 +0000"  >&lt;p&gt;Oh... the Summary field said &quot;Add AsQueryable to IMongoDBCollection&quot;, but you meant &quot;Should IMongoDBCollection implement IQueryable?&quot;.&lt;/p&gt;

&lt;p&gt;I suppose that&apos;s a possibility. The current approach of using the AsQueryable extension method allows the opportunity to pass in the AggregateOptions that should be used when executing the LINQ query.&lt;/p&gt;

&lt;p&gt;We&apos;d have to think more thoroughly about the implications of changing IMongoDBCollection to implement IQueryable directly to make sure there are no unintended side effects or undesirable consequences.&lt;/p&gt;</comment>
                            <comment id="2422360" author="rcollette@yahoo.com" created="Tue, 17 Sep 2019 00:05:13 +0000"  >&lt;p&gt;I am not talking about IDE behavior.&lt;/p&gt;

&lt;p&gt;The framework does not see IMongoDbCollection as an IQueryable implementation because, well, it isn&apos;t.&#160; &#160;I don&apos;t know what the framework does&#160;specifically ( I could dig if you really want) but I suspect that it&apos;s just checking if&#160; the type is IQueryable and calling the AsQueryable method.&lt;/p&gt;

&lt;p&gt;If IMongoDbCollection implemented IQueryable, IQueryable&amp;lt;T&amp;gt; directly, rather than as an extensions method,&#160; it would not be necessary to to call the AsQueryable method when creating LINQ queries.&#160; It&apos;s actually abnormal to have to do so under normal circumstances.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</comment>
                            <comment id="2421436" author="jeff.yemin" created="Mon, 16 Sep 2019 14:41:59 +0000"  >&lt;p&gt;Can you be more specific with what you mean by Linq discovering &lt;tt&gt;AsQueryable&lt;/tt&gt;?  Are you talking about Visual Studio behavior, or perhaps some other IDE? &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|hvbcnb:</customfieldvalue>

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