Skip to content

melkio/MongoDB.Extensions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MongoDB.Extensions

Using aggregation framework with C# seems very verbose. MongoDB.Extensions contains a fluent interface around pipeline operations to build and execute aggregation.

You can try it, installing nuget package into your solution:
Install-Package MongoDB.Extensions

An easy sample, about how to use package API:

var result = _collection.CreatePipeline()
            .Match(d => d.Value >= 10)
            .Project(c =>
                {
                    c.Contains(d => d.Value);
                    c.Contains("temp", d => d.Child.Leaf.Value);
                    c.NotContains(d => d.Id);
                })
            .Sort(c =>
                {
                    c.Descending(d => d.Value);
                })
            .Skip(4)
            .Limit(3)
            .Execute();

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published