Exemple #1
0
        public PostService(IPikDatabaseSetting settings)
        {
            var client   = new MongoClient(settings.ConnectionString);
            var database = client.GetDatabase(settings.DatabaseName);

            _post = database.GetCollection <Post>(settings.PostCollectionName);
        }
Exemple #2
0
        public UserService(IPikDatabaseSetting settings)
        {
            var client   = new MongoClient(settings.ConnectionString);
            var database = client.GetDatabase(settings.DatabaseName);

            _user = database.GetCollection <User>(settings.UserCollectionName);
        }