public MongoDataSource(IAgaMongoServer mongoServer, DatasourceParams datasourceParams) { var database = mongoServer.Server.GetDatabase(datasourceParams.DatabaseName); if (!database.CollectionExists(datasourceParams.CollectionName)) { database.CreateCollection(datasourceParams.CollectionName); } _collection = database.GetCollection <T>(datasourceParams.CollectionName); }
public MongoDataSource(IAgaMongoServer mongoServer, DatasourceParams datasourceParams) { var database = mongoServer.Server.GetDatabase(datasourceParams.DatabaseName); _collection = database.GetCollection <T>(datasourceParams.CollectionName); }