public CircleService(ISocialNetworkDatabaseSettings settings)
        {
            var client = new MongoClient(settings.ConnectionString);
            var db     = client.GetDatabase(settings.DatabaseName);

            this.Entities = db.GetCollection <Circle>(settings.CircleCollectionName);
        }
        public GenericService(ISocialNetworkDatabaseSettings settings, string collectionName)
        {
            var client   = new MongoClient(settings.ConnectionString);
            var database = client.GetDatabase(settings.DatabaseName);

            _collection = database.GetCollection <TCollection>(collectionName);
        }
Пример #3
0
        public PostService(ISocialNetworkDatabaseSettings settings)
        {
            var client = new MongoClient(settings.ConnectionString);
            var db     = client.GetDatabase(settings.DatabaseName);

            Entities = db.GetCollection <Post>(settings.PostCollectionName);
        }
Пример #4
0
        public CircleService(ISocialNetworkDatabaseSettings settings)
        {
            var client   = new MongoClient(settings.ConnectionString);
            var database = client.GetDatabase(settings.DatabaseName);

            _circles = database.GetCollection <Circle>(settings.CircleCollection);
        }
Пример #5
0
        public UserService(ISocialNetworkDatabaseSettings settings)
        {
            var client   = new MongoClient(settings.ConnectionString);
            var database = client.GetDatabase(settings.DatabaseName);

            _user = database.GetCollection <User>(settings.UserCollectionName);
        }
Пример #6
0
        public CommentService(ISocialNetworkDatabaseSettings settings)
        {
            var client   = new MongoClient(settings.ConnectionString);
            var database = client.GetDatabase(settings.DatabaseName);

            _comment = database.GetCollection <Comment>(settings.CommentCollectionName);
        }
Пример #7
0
        public FeedService(ISocialNetworkDatabaseSettings settings)
        {
            var client   = new MongoClient(settings.ConnectionString);
            var database = client.GetDatabase(settings.DatabaseName);

            _feed = database.GetCollection <Feed>(settings.FeedCollection);
        }
Пример #8
0
        public FollowsService(ISocialNetworkDatabaseSettings settings)
        {
            var client   = new MongoClient(settings.ConnectionString);
            var database = client.GetDatabase(settings.DatabaseName);

            _follows = database.GetCollection <Follows>(settings.FollowsCollectionName);
        }
Пример #9
0
        public WallService(ISocialNetworkDatabaseSettings settings)
        {
            var client   = new MongoClient(settings.ConnectionString);
            var database = client.GetDatabase(settings.DatabaseName);

            _walls = database.GetCollection <Wall>(settings.WallCollection);
        }
        public SeedController(ISocialNetworkDatabaseSettings settings)
        {
            var client   = new MongoClient(settings.ConnectionString);
            var database = client.GetDatabase(settings.DatabaseName);

            _users   = database.GetCollection <User>(settings.UserCollectionName);
            _circles = database.GetCollection <Circle>(settings.CircleCollectionName);
        }
Пример #11
0
        public UserService(ISocialNetworkDatabaseSettings settings)
        {
            var client = new MongoClient(settings.ConnectionString);
            var db     = client.GetDatabase(settings.DatabaseName);

            this.Entities = db.GetCollection <User>(settings.UserCollectionName);

            Instance = this;
        }
Пример #12
0
        public DataSeeder(ISocialNetworkDatabaseSettings settings)
        {
            var client   = new MongoClient(settings.ConnectionString);
            var database = client.GetDatabase(settings.DatabaseName);

            _blocked = database.GetCollection <Blocked>(settings.BlockedCollectionName);
            _circle  = database.GetCollection <Circle>(settings.CircleCollectionName);
            _comment = database.GetCollection <Comment>(settings.CommentCollectionName);
            _follows = database.GetCollection <Follows>(settings.FollowsCollectionName);
            _user    = database.GetCollection <User>(settings.UserCollectionName);
            _post    = database.GetCollection <Post>(settings.PostCollectionName);
        }