<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:35:53 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-126] New GetCollection&lt;T&gt;() signature that uses a default collection name based on the Type of collection (NORM migration suggestion)</title>
                <link>https://jira.mongodb.org/browse/CSHARP-126</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;If GetCollection&amp;lt;T&amp;gt; had a method that took no argument it would be easier for people to migrate from Norm to this driver.  Simply construct a default collection name based on the type in use:-&lt;/p&gt;

&lt;p&gt;e.g. in MongoDatabase.cs&lt;/p&gt;

&lt;p&gt;        public MongoCollection&amp;lt;TDefaultDocument&amp;gt; GetCollection&amp;lt;TDefaultDocument&amp;gt;()&lt;/p&gt;
        {
            string collectionName = typeof(TDefaultDocument).Name;
            return GetCollection&amp;lt;TDefaultDocument&amp;gt;(collectionName, safeMode);
        }

&lt;p&gt;This makes quick start / simple / common examples just a bit simpler and less error prone as there&apos;s no string value to get right.&lt;/p&gt;</description>
                <environment>Win 7, .NET 4, VS 2010</environment>
        <key id="13862">CSHARP-126</key>
            <summary>New GetCollection&lt;T&gt;() signature that uses a default collection name based on the Type of collection (NORM migration suggestion)</summary>
                <type id="2" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14711&amp;avatarType=issuetype">New Feature</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="12300">Won&apos;t Do</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="ianmercer">Ian Mercer</reporter>
                        <labels>
                    </labels>
                <created>Sat, 4 Dec 2010 06:35:16 +0000</created>
                <updated>Thu, 3 Dec 2020 16:46:45 +0000</updated>
                            <resolved>Thu, 3 Dec 2020 16:46:45 +0000</resolved>
                                    <version>0.7</version>
                                                    <component>Feature Request</component>
                                        <votes>7</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="36550" author="middletommy" created="Tue, 7 Jun 2011 13:39:25 +0000"  >&lt;p&gt;I like the approach of optional parameters for c# 4.0 support&lt;br/&gt;
public MongoCollection&amp;lt;TDefaultDocument&amp;gt; GetCollection&amp;lt;TDefaultDocument&amp;gt;(string name = null) &lt;/p&gt;
        { 
            string collectionName = name;
            if(collectionName == null)
                 collectionName = typeof(TDefaultDocument).Name; 
            return GetCollection&amp;lt;TDefaultDocument&amp;gt;(collectionName, safeMode); 
        } </comment>
                            <comment id="21377" author="craiggwilson" created="Mon, 13 Dec 2010 17:33:45 +0000"  >&lt;p&gt;This is a little more difficult than you would think.  You have to take into account inheritance and how the name of the collection should (in most cases) stay the same.  &lt;/p&gt;

&lt;p&gt;BTW: Robert, this is the particular case I was using when I submitted the &quot;extensions&quot; fork.  We could do this outside the main API using an extension method if we could store items into both the convention profile as well as the BsonClassMap.&lt;/p&gt;</comment>
                            <comment id="21086" author="gduford" created="Mon, 6 Dec 2010 03:24:32 +0000"  >&lt;p&gt;What&apos;s done in &lt;a href=&quot;https://github.com/mongodb-csharp/mongodb-csharp&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb-csharp/mongodb-csharp&lt;/a&gt; is very good.&lt;br/&gt;
You can configure the collection name in the profile, with options like pluralization, casing and such.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="92023">CSHARP-833</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <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|hs0td3:</customfieldvalue>

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