• This repository has been archived on 22/Feb/2020
  • Stars
    star
    310
  • Rank 131,645 (Top 3 %)
  • Language
    C#
  • License
    MIT License
  • Created over 9 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Repository abstraction layer on top of Official MongoDB C# driver

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);
        }
}

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

More Repositories

1

IdGen

Twitter Snowflake-alike ID generator for .Net
C#
1,142
star
2

TwoFactorAuth

PHP library for Two Factor Authentication (TFA / 2FA)
PHP
1,025
star
3

TwoFactorAuth.Net

.Net library for Two Factor Authentication (TFA / 2FA)
C#
336
star
4

NUlid

.Net ULID implementation
C#
335
star
5

NIdenticon

NIdenticon is a library for creating simple Identicons
C#
94
star
6

NGeoNames

Inspired by https://github.com/AReallyGoodName/OfflineReverseGeocode
C#
87
star
7

IP2Country

Ip to country mapping
C#
48
star
8

SimpleFeedReader

Easy to use, simple, Syndication feed reader
C#
32
star
9

NPushOver

Full fledged, async, .Net Pushover client
C#
24
star
10

NISOCountries

Always up-to-date (.Net) ISO Country list
C#
23
star
11

DebuggableSelfInstallingService

A Debuggable, Self-Installing Windows Service Template based on James Michael Hare's excellent blogposts
C#
22
star
12

TimeZoneMapper

Library for mapping *N*X TimeZone ID's (e.g. Europe/Amsterdam) to .Net's TimeZoneInfo classes.
C#
18
star
13

ITimer

Provides a testable abstraction and alternative to System.Threading.Timer and System.Timers.Timer. Targets netstandard2.0 and higher.
C#
16
star
14

TextTableBuilder

Simple, opinionated, modern table builder
C#
12
star
15

DSMRParser.Net

DSMR Parser for .Net
C#
9
star
16

HumanoID

Friendly ID generator. Converts integers to words and back.
PHP
7
star
17

NEnvoy

.Net Enphase Envoy client library
C#
7
star
18

2FACLIClient

LastPass 2FA CLI Client
C#
6
star
19

IClock

Provides a testable abstraction and alternative to DateTime.Now / DateTime.UtcNow
C#
6
star
20

DebuggableSelfInstallingOwinService

A Self-hosted OWIN Windows Service project template that is easier to run and debug than the default Windows Service project template
C#
6
star
21

WordClock

Hobby project building a word clock with friends.
C++
5
star
22

RobThree

3
star
23

NaarDeKloot.nl

Repository for NaarDeKloot.nl
CSS
3
star
24

IPNetworkHelper

Provides helper (extension)methods for working with IPNetworks
C#
3
star
25

NetnummersNL

Interactieve kaart van netnummers (kengetallen) in Nederland / Interactive map of area codes for the Netherlands
HTML
2
star
26

SAC9010QC-SAC12010QC

Reverse engineered IR protocol for HomeFit Living / Alaska SAC9010QC/SAC12010QC (NEC 756504012 based) remote control
C++
2
star
27

P1-meter

P1 Meter (Wemos D1 mini) - Serial to HTTP POST. See also https://github.com/RobThree/DSMR.Net
C++
2
star
28

AutoRefreshTokenHttpMessageHandler

A thread-safe implementation of a DelegatingHandler that automatically refreshes the access token when the access token expires whilst **not** serializing all requests.
C#
2
star
29

NuGetProxy

NuGet proxy that allows anonymous access to NuGet servers that require authentication.
C#
2
star
30

NMSSQLReplication

.Net library for retrieving (and managing) MSSQL Replication information
C#
1
star
31

NLog.Targets.Pushover

NLog.Targets.Pushover is a custom target for NLog enabling you to send logging messages to the Pushover service
C#
1
star
32

RSV

.Net library for reading / writing RSV files
C#
1
star
33

HttpNamespaceManager

Paul Wheeler's HttpNamespacemanager - with minor improvements
C#
1
star