Exemplo n.º 1
0
        public FileService(IMongoDataServiceSettings config)
        {
            var database = new MongoClient(config.ConnectionString)
                           .GetDatabase(config.DatabaseName);

            _mediaBucket = new GridFSBucket(
                database, new GridFSBucketOptions
            {
                BucketName     = BucketName,
                ChunkSizeBytes = ChunkSize,
            });
        }
Exemplo n.º 2
0
 public MongoGameService(IMongoDataServiceSettings settings)
     : base(settings, CollectionName)
 {
 }
Exemplo n.º 3
0
 public CategoryService(IMongoDataServiceSettings settings, IFileService fileService)
     : base(settings, CollectionName)
 {
     _fileService = fileService;
 }
Exemplo n.º 4
0
 public QuestionTypeService(IMongoDataServiceSettings settings) : base(settings, "questionTypes")
 {
 }
Exemplo n.º 5
0
 protected AMongoModelService(IMongoDataServiceSettings settings, string collectionName)
 {
     MongoCollection = new MongoClient(settings.ConnectionString)
                       .GetDatabase(settings.DatabaseName)
                       .GetCollection <T>(collectionName);
 }