예제 #1
0
 public ContentContext(IConfiguration configuration)
 {
     _db     = DbContext.Create("my-practice", configuration["MongoDB:Content:ConnectionString"]);
     _media  = _db.Database.GetCollection <ContentDAO>("content");
     Content = _media;
 }
예제 #2
0
 public LibraryContext(IConfiguration configuration)
 {
     _db      = DbContext.Create("my-practice", configuration["MongoDB:Library:ConnectionString"]);
     _library = _db.Database.GetCollection <HubDAO>("library");
     Library  = _library;
 }