Skip to content

ebrahimkhodadadi/MongoRepository

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MongoDBAspNetCore

Mongo Database Repository in Asp.net Core

  • Add Data.Mongo to your project
  • Add Mongo connection in AppSettings
  • Inject Mongo Repository

Tips

use [BsonIgnoreIfNull] Attribute to dont save property if it's null

To use filters

    _repository.AsQueryable().Where(x => x.Created >= from && x.Created <= to);

Warning Dont use AsEnumerable as much as you can it will decrease the speed and performance so much

About

Mongo database in asp.net core example

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages