public static MongoCollection <T> GetCollectionFromUrl <T>(MongoUrl url, string collectionName) where T : IMongoEntity <ObjectId> { return(MongoCoreExtentions <ObjectId> .GetDatabaseFromUrl(url)?.GetCollection <T>(collectionName)); }
public static MongoCollection <T> GetCollectionFromConnectionString <T>(string connectionString, string collectionName) where T : IMongoEntity <ObjectId> { return(MongoCoreExtentions <ObjectId> .GetDatabaseFromUrl(new MongoUrl(connectionString))?.GetCollection <T>(collectionName)); }