mongodb-csharp CRUD Operations in MongoDB C# Select a Document (Linq)


Example

var client = new MongoClient("mongodb://localhost:27017");
var database = client.GetDatabase("test");
var collection = database.GetCollection < Interactions > ("Interactions");   
var result = IMongoCollectionExtensions
            .AsQueryable(collection)
            .FirstOrDefault(s => s.SiteName == "Example");