Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Feb 22, 2020. It is now read-only.

Repository abstraction layer on top of Official MongoDB C# driver

License

NotificationsYou must be signed in to change notification settings

RobThree/MongoRepository

Repository files navigation

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 aNuGet package for your convenience. If you're new to NuGet,check it out; it's painless, easy and fast. You can find this project bysearching for MongoRepository in NuGet (orsimply clicking here).

Check thedocumentation 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 MongoDbpublicclassCustomer:Entity{publicstringFirstName{get;set;}publicstringLastName{get;set;}}publicclassCustomerRepoTest{publicvoidTest(){varrepo=newMongoRepository<Customer>();// adding new entityvarnewCustomer=newCustomer{FirstName="Steve",LastName="Cornell"};repo.Add(newCustomer);// searchingvarresult=repo.Where(c=>c.FirstName=="Steve");// updatingnewCustomer.LastName="Castle";repo.Update(newCustomer);}}

Productivity Visual Studio add-in for C#, VB.NET, XML, XAML, ASP.NET and more

About

Repository abstraction layer on top of Official MongoDB C# driver

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp