Esempio n. 1
0
        public UserService(ILapSimDatabaseSettings settings)
        {
            var client   = new MongoClient(settings.ConnectionString);
            var database = client.GetDatabase(settings.DatabaseName);

            _userCollection = database.GetCollection <User>(settings.UserCollectionName);
        }
Esempio n. 2
0
        public TeamsService(ILapSimDatabaseSettings settings)
        {
            var client   = new MongoClient(settings.ConnectionString);
            var database = client.GetDatabase(settings.DatabaseName);

            _teams       = database.GetCollection <Team>(settings.TeamsCollectionName);
            _simulations = database.GetCollection <Simulation>(settings.SimulationsCollectionName);
        }
        public ProjectLeadersService(ILapSimDatabaseSettings settings, ITeamsService teamService)
        {
            var client   = new MongoClient(settings.ConnectionString);
            var database = client.GetDatabase(settings.DatabaseName);

            _projectLeaders = database.GetCollection <Model.ProjectLeader>(settings.ProjectLeadersCollectionName);
            _teamsService   = teamService;
        }