MongoDB.Entities v4.1 Released
The goal of this library is to simplify access to mongodb by wrapping up the official C# mongodb driver and providing some additional features on top of it. The API is clean and intuitive resulting in less lines of code that is more readable/ human friendly than driver code.
Advantages:
- Never have to deal with
ObjectIdsorBsonDocuments. - Everything is type safe. No magic strings needed.
- Model your entities in either Document/NoSQL stye or Relational/SQL style or a mix of both.
- Built-in automatic support for
One-To-One,One-To-ManyandMany-To-Manyrelationships. - Data can be queried using either LINQ or lambda expressions.
- Programatically define indexes.
- Full text search with text indexes.
-
Supports both
ASP.Net Coreand.Net Coreapplications.Code Sample
```csharp //Initialize database connection new DB("bookshop");
//Create and persist an entity var book = new Book { Title = "The Power Of Now" }; book.Save();
//One-To-Many relationship var tolle = new Author { Name = "Eckhart Tolle" }; tolle.Save(); book.Authors.Add(tolle);
//Query var eckhart = DB.Collection<Author>() .Where(a => a.Name.Contains("Eckhart")) .SingleOrDefault(); //Delete book.Delete(); ```
Wiki/Getting Started
in order to get started using the library please see the wiki pages.
0 comments:
Post a Comment