Govind Malviya
Govind Malviya

Reputation: 13753

Get Raw document from MongoDB through NoRM

How to get raw document through NoRM driver of MongoDB or any other way?

Like i run command on shell

db.test.find({id:"235272479242"})

Upvotes: 1

Views: 311

Answers (1)

Stennie
Stennie

Reputation: 65363

The NoRM equivalent to fetch a single document by Id would be:

 db.GetCollection<test>().FindOne(new { Id = "235272479242" });

Note that NoRM hasn't been updated in several years now and is no longer supported by the original developer.

It would be worth looking into the 10gen-supported MongoDB C# / .NET driver which is actively maintained and supports the newest MongoDB server features.

Upvotes: 1

Related Questions