コード例 #1
0
ファイル: UserService.cs プロジェクト: emdarden/Capstone
        public UserService(IJourniDatabaseSettings settings)
        {
            var client   = new MongoClient(settings.ConnectionString);
            var database = client.GetDatabase(settings.DatabaseName);

            _users = database.GetCollection <User>(settings.UsersCollectionName);
        }
コード例 #2
0
ファイル: PlaceService.cs プロジェクト: emdarden/Capstone
        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;
        }