Skip to content

Conversation

rustagir
Copy link
Contributor

Pull Request Info

PR Reviewing Guidelines

JIRA - https://jira.mongodb.org/browse/DOCSP-27283
Staging - https://preview-mongodbrustagir.gatsbyjs.io/csharp/DOCSP-27283-class-overview/fundamentals/database-collection/

Self-Review Checklist

  • Is this free of any warnings or errors in the RST?
  • Did you run a spell-check?
  • Did you run a grammar-check?
  • Are all the links working?
  • Are the facets and meta keywords accurate?

Copy link
Collaborator

@jordan-smith721 jordan-smith721 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job on this! Just a few suggestions & typo fixes

Comment on lines 36 to 41
Call the `GetDatabase()
<{+new-api-root+}/MongoDB.Driver/MongoDB.Driver.IMongoClient.GetDatabase.html>`__
method on an `IMongoClient
<{+new-api-root+}/MongoDB.Driver/MongoDB.Driver.IMongoClient.html>`__
instance to create an ``IMongoDatabase``, passing the database name as a
parameter.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

S: Move the objective to the front

Suggested change
Call the `GetDatabase()
<{+new-api-root+}/MongoDB.Driver/MongoDB.Driver.IMongoClient.GetDatabase.html>`__
method on an `IMongoClient
<{+new-api-root+}/MongoDB.Driver/MongoDB.Driver.IMongoClient.html>`__
instance to create an ``IMongoDatabase``, passing the database name as a
parameter.
To create an ``IMongoDatabase``, call the `GetDatabase()
<{+new-api-root+}/MongoDB.Driver/MongoDB.Driver.IMongoClient.GetDatabase.html>`__
method on an `IMongoClient
<{+new-api-root+}/MongoDB.Driver/MongoDB.Driver.IMongoClient.html>`__
instance and pass the database name as a parameter.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed all

If you pass the name of a nonexistent database to the ``GetDatabase()``
method, the driver still returns an
``IMongoDatabase`` instance. When you insert any data into a collection in this
database, the server creates the collection at that time.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
database, the server creates the collection at that time.
database, the server creates the database and collection at that time.

Comment on lines 154 to 159
This example uses the ``GetCollection()`` method to
perform the following actions:

- Access a collection called ``coll_xyz`` from a database referenced by
the ``myDB`` variable
- Set a write concern on the collection in the ``MongoCollectionSettings`` type
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this example needs to set the write concern. It would be more clear and focused on accessing a collection if it only gets the "coll_xyz" collection.

Comment on lines 219 to 220
The following code shows how to create a collection called ``coll_abc``
within a database referenced by the ``myDB`` variable:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate sentence

Comment on lines 295 to 296
method on your ``IMongoCollection`` instance. The following code shows
how to drop a collection referenced by the ``myColl`` variable:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate sentence

Suggested change
method on your ``IMongoCollection`` instance. The following code shows
how to drop a collection referenced by the ``myColl`` variable:
method on your ``IMongoCollection`` instance.

@rustagir rustagir requested a review from jordan-smith721 May 30, 2024 17:23
Copy link
Collaborator

@jordan-smith721 jordan-smith721 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@rustagir rustagir requested review from a team and BorisDog May 30, 2024 18:09
Copy link
Collaborator

@JamesKovacs JamesKovacs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well-written! LGTM.

@rustagir rustagir merged commit 5b5ca74 into mongodb:master Jun 5, 2024
rustagir added a commit that referenced this pull request Jun 5, 2024
* DOCSP-27283: db coll page

* JS PR fixes 1

(cherry picked from commit 5b5ca74)
rustagir added a commit that referenced this pull request Jun 5, 2024
* DOCSP-27283: db coll page

* JS PR fixes 1

(cherry picked from commit 5b5ca74)
rustagir added a commit that referenced this pull request Jun 5, 2024
* DOCSP-27283: db coll page

* JS PR fixes 1

(cherry picked from commit 5b5ca74)
rustagir added a commit that referenced this pull request Jun 5, 2024
* DOCSP-27283: db coll page

* JS PR fixes 1

(cherry picked from commit 5b5ca74)
rustagir added a commit that referenced this pull request Jun 5, 2024
* DOCSP-27283: db coll page

* JS PR fixes 1

(cherry picked from commit 5b5ca74)
rustagir added a commit that referenced this pull request Jun 5, 2024
* DOCSP-27283: db coll page

* JS PR fixes 1

(cherry picked from commit 5b5ca74)
rustagir added a commit that referenced this pull request Jun 5, 2024
* DOCSP-27283: db coll page

* JS PR fixes 1

(cherry picked from commit 5b5ca74)
mongoKart pushed a commit to mongoKart/docs-csharp that referenced this pull request May 16, 2025
* DOCSP-27283: db coll page

* JS PR fixes 1
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.

3 participants