public MongodbRepository(MongodbContext context, IMediator mediator, INotificationManager msg) { _mediator = mediator; _msg = msg; _database = context.Database; _collection = _database.GetCollection <T>(typeof(T).Name); }
public static List <QueryConfig> BuildConfigApp(IDataSourceSettings dbSettings) { IMongodbContext context = new MongodbContext(dbSettings); var listOfQueryConfigs = context.GetCollection <QueryConfig>(dbSettings.Entity).AsQueryable().ToList(); return(listOfQueryConfigs); }
public MongoDBRepository() { this.RegisterAutoMap(); IMongoDatabase Database = MongodbContext.GetDatabase(); String collectionName = this.GetCollectionName(); this._mongoCollection = Database.GetCollection <T>(collectionName); }
public static void BuildConfiguration() { var collectionOfConnectStrings = ConfigurationHelper.LoadConfiguration(); IDataSourceSettings settings = new DataSourceSettings { ConnectionString = collectionOfConnectStrings.ReadWriteConnectionString, Database = collectionOfConnectStrings.Database, Entity = collectionOfConnectStrings.Entity }; var collectionName = collectionOfConnectStrings.Entity; IMongodbContext context = new MongodbContext(settings); var collection = context.GetCollection <QueryConfig>(collectionName); collection.DeleteMany(new BsonDocument()); //delete all collection.InsertMany(SeedData.GetConfigurationData(collectionOfConnectStrings)); }
public DatabaseRepository(MongodbContext context) { _context = context; }
public UserRepository(MongodbContext context) : base(context) { }
public SetupService() { _db = WebConfig.GetMongodb(); }
public ConsumerErrorMessageStore(MongodbContext <LogMongoSettings> mongoDatabase, ILogger <NoSqlBaseRepository <ConsumerErrorMessage, LogMongoSettings> > logger) : base(mongoDatabase, logger) { }
public MessageHandlerResultStore(MongodbContext <LogMongoSettings> mongoDatabase, ILogger <NoSqlBaseRepository <MessageHandlerResult, LogMongoSettings> > logger) : base(mongoDatabase, logger) { }
public DefaultMongoStore(MongodbContext <LogMongoSettings> mongoDatabase, ILogger <NoSqlBaseRepository <TCollection, LogMongoSettings> > logger) : base(mongoDatabase, logger) { }
public AppNoSqlBaseRepository(MongodbContext <MongoDefaultSetting> mongoDatabase, ILogger <AppNoSqlBaseRepository <TEntity> > logger) : base(mongoDatabase, logger) { }
public IPRepository(IOptions <Settings> settings) { _context = new MongodbContext(settings); }
public ConsumerRetryPolicyStore(MongodbContext <LogMongoSettings> mongoDatabase, ILogger <NoSqlBaseRepository <ConsumerRetryPolicy, LogMongoSettings> > logger) : base(mongoDatabase, logger) { }
public MongodbRepository(MongodbContext context) { this.context = context; }
public EntityRepository(MongodbContext context, IMediator mediator, INotificationManager msg) : base(context, mediator, msg) { }
public MockServerNoSqlRepository(MongodbContext <MockServerMongoSettings> mongoDatabase, ILogger <NoSqlBaseRepository <TEntity, MockServerMongoSettings> > logger) : base(mongoDatabase, logger) { }
public MongodbLogBaseRepository(MongodbContext context) : base(context.ConnectionString, nameof(MongoDB.APILogs)) { }