Popularity
5.0
Stable
Activity
0.3
Declining
289
40
138

Description

An easy to use library to use MongoDB with .NET. It implements a Repository pattern on top of Official MongoDB C# driver. This project is now available as a NuGet package for your convenience. If you're new to NuGet, check it out; it's painless, easy and fast. You can find this project by searching for MongoRepository in NuGet (or simply clicking here).

Check the documentation for a step-by-step example and more advanced usage.

Code Quality Rank: L5
Programming language: C#
Tags: MongoDB     Repository     Driver     Linq     ORM     Mongo    
Latest version: v1.6.11

MongoDB Repository pattern implementation alternatives and similar packages

Based on the "ORM" category.
Alternatively, view MongoDB Repository pattern implementation alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of MongoDB Repository pattern implementation or a related project?

Add another 'ORM' Package

README

Logo Project Description

An easy to use library to use MongoDB with .NET. It implements a Repository pattern on top of Official MongoDB C# driver. This project is now available as a NuGet package for your convenience. If you're new to NuGet, check it out; it's painless, easy and fast. You can find this project by searching for MongoRepository in NuGet (or simply clicking here).

Check the documentation for a step-by-step example and more advanced usage.

Example:

// The Entity base-class is provided by MongoRepository
// for all entities you want to use in MongoDb
public class Customer : Entity 
{
        public string FirstName { get; set; }
        public string LastName { get; set; }
}

public class CustomerRepoTest
{
        public void Test()
        {
            var repo = new MongoRepository<Customer>();

            // adding new entity
            var newCustomer = new Customer {
                FirstName = "Steve",
                LastName = "Cornell"
            };

            repo.Add(newCustomer);

            // searching
            var result = repo.Where(c => c.FirstName == "Steve");

            // updating 
            newCustomer.LastName = "Castle";
            repo.Update(newCustomer);
        }
}