Beispiel #1
0
 public static MongoCollection <T> GetCollectionFromUrl <T>(MongoUrl url, string collectionName)
     where T : IMongoEntity <ObjectId>
 {
     return(MongoCoreExtentions <ObjectId> .GetDatabaseFromUrl(url)?.GetCollection <T>(collectionName));
 }
Beispiel #2
0
 public static MongoCollection <T> GetCollectionFromConnectionString <T>(string connectionString, string collectionName)
     where T : IMongoEntity <ObjectId>
 {
     return(MongoCoreExtentions <ObjectId> .GetDatabaseFromUrl(new MongoUrl(connectionString))?.GetCollection <T>(collectionName));
 }
Beispiel #3
0
 public static MongoCollection <T> GetCollectionFromUrl <T>(MongoUrl url)
     where T : IMongoEntity <ObjectId>
 {
     return(MongoCoreExtentions <ObjectId> .GetCollectionFromUrl <T>(url, GetCollectionName <T>()));
 }
Beispiel #4
0
 public static MongoCollection <T> GetCollectionFromConnectionString <T>(string connectionString)
     where T : IMongoEntity <ObjectId>
 {
     return(MongoCoreExtentions <ObjectId> .GetCollectionFromConnectionString <T>(connectionString, GetCollectionName <T>()));
 }