Skip to content
This repository was archived by the owner on Feb 22, 2020. It is now read-only.

Commit f6fd3bb

Browse files
committed
Create README.md
1 parent dc9188d commit f6fd3bb

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

README.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Project Description
2+
3+
4+
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](https://www.nuget.org) package for your convenience. If you're new to NuGet, [check it out](http://docs.nuget.org/); it's painless, easy and fast. You can find this project by [searching for MongoRepository](https://www.nuget.org/packages?q=mongorepository) in NuGet (or [simply clicking here](http://nuget.org/packages/MongoRepository)).
5+
6+
Check the documentation for a step-by-step example and more advanced usage.
7+
8+
## Example:
9+
10+
```c#
11+
public class Customer : Entity
12+
// The Entity base-class is provided by MongoRepository
13+
// for all entities you want to use in MongoDb
14+
{
15+
public string FirstName { get; set; }
16+
public string LastName { get; set; }
17+
}
18+
19+
public class CustomerRepoTest
20+
{
21+
public void Test()
22+
{
23+
var repo = new MongoRepository<Customer>();
24+
25+
// adding new entity
26+
var newCustomer = new Customer {
27+
FirstName = "Steve",
28+
LastName = "Cornell"
29+
};
30+
31+
repo.Add(newCustomer);
32+
33+
// searching
34+
var result = repo.Where(c => c.FirstName == "Steve");
35+
36+
// updating
37+
newCustomer.LastName = "Castle";
38+
repo.Update(newCustomer);
39+
}
40+
}
41+
```
42+
43+
![Productivity Visual Studio add-in for C#, VB.NET, XML, XAML, ASP.NET and more](http://i.imgur.com/2yf60gf.png|http://www.jetbrains.com/resharper/features/index.html)

0 commit comments

Comments
 (0)