public ListService(IToDoDatabaseSettings settings) { var client = new MongoClient(settings.ConnectionString); var db = client.GetDatabase(settings.DatabaseName); lists = db.GetCollection <ToDoList>(settings.ListCollectionName); }
public ToDoService(IToDoDatabaseSettings settings) { var client = new MongoClient(settings.ConnectionString); var database = client.GetDatabase(settings.DatabaseName); _items = database.GetCollection <ToDoItem>(settings.ToDoCollectionsName); }
public JobService(IToDoDatabaseSettings settings) { var client = new MongoClient(settings.ConnectionString); var database = client.GetDatabase(settings.DatabaseName); _jobs = database.GetCollection <Job>(settings.JobsCollectionName); }
public ToDoService(IToDoDatabaseSettings settings, ILogger <ToDoService> logger) { var client = new MongoClient(settings.ConnectionString); var database = client.GetDatabase(settings.DatabaseName); _toDoTasks = database.GetCollection <ToDoTask>(settings.CollectionName); _logger = logger; }