public UserService(IJourniDatabaseSettings settings) { var client = new MongoClient(settings.ConnectionString); var database = client.GetDatabase(settings.DatabaseName); _users = database.GetCollection <User>(settings.UsersCollectionName); }
public PlaceService(IJourniDatabaseSettings settings, DayService dayService, UserService userService) { var client = new MongoClient(settings.ConnectionString); var database = client.GetDatabase(settings.DatabaseName); _users = database.GetCollection <User>(settings.UsersCollectionName); _dayService = dayService; _userService = userService; }