Exemple #1
0
 public ReportService(IDBContextFactory contextFactory)
 {
     if (contextFactory == null)
     {
         throw new ArgumentNullException(nameof(contextFactory));
     }
     _contextFactory = contextFactory;
 }
Exemple #2
0
 /// <summary>
 /// Constructor which creates new DatabaseWriter instance.
 /// </summary>
 /// <param name="datagenerator">Instance of generator.</param>
 /// <param name="dbContextFactory">The factory object which creates <see cref="DbContext"/></param>
 public DatabaseWriter(IDatagenerator <T> datagenerator, IDBContextFactory dbContextFactory)
 {
     _datagenerator    = datagenerator;
     _dbContextFactory = dbContextFactory;
     RecordsPerSecond  = 150;
     using (var dbContext = _dbContextFactory.Create())
     {
         _recordsCount = dbContext.Set <T>().Count();
     }
 }
Exemple #3
0
 public RatesUpdateScheduleTask(
     Settings settigns,
     IBankService bankService,
     IDBContextFactory contextFactory,
     ILogger <RatesUpdateScheduleTask> logger)
 {
     if (bankService == null)
     {
         throw new ArgumentNullException(nameof(_bankService));
     }
     _logger         = logger;
     _bankService    = bankService;
     _contextFactory = contextFactory;
     _timer          = new Timer(settigns.Interval.TotalMilliseconds);
 }
 public RatesBulkLoader(
     IBankService bankService,
     IDBContextFactory contextFactory,
     ILogger <RatesBulkLoader> logger)
 {
     if (bankService == null)
     {
         throw new ArgumentNullException(nameof(bankService));
     }
     if (contextFactory == null)
     {
         throw new ArgumentNullException(nameof(contextFactory));
     }
     _logger         = logger;
     _bankService    = bankService;
     _contextFactory = contextFactory;
 }
Exemple #5
0
 public CartRepo(IProductRepo productRepo, IDBContextFactory factory)
 {
     this.productRepo = productRepo;
     this.factory = factory;
 }
 public WordEntryRepository(IDBContextFactory contextFactory)
 {
     _contextFactory = contextFactory;
 }
 public FileRepository(IDBContextFactory contextFactory)
 {
     _contextFactory = contextFactory;
 }
 public ContractRepository(IDBContextFactory dbContextFactory) : base(dbContextFactory)
 {
 }
 public MassRehireRepository(IDBContextFactory _contextFactory)
 {
     this._contextFactory = _contextFactory;
 }
 protected RepositoryBase(IDBContextFactory context)
 {
     m_DBContext = context.GetDBContext();
     m_DBSet     = m_DBContext.Set <T>();
     m_UsingSharedObjectContext = false;
 }
Exemple #11
0
 /// <summary>
 /// Creation of Massterminate Repository using DBContextFactory that sets appropriate ConnectionString
 /// </summary>
 /// <param name="factory"></param>
 public MassTerminateRepository(IDBContextFactory factory)
 {
     this._contextfactory = factory;
 }
Exemple #12
0
 public EventRepository(IDBContextFactory context)
     : base(context)
 {
 }
Exemple #13
0
 public PortalRepository(IDBContextFactory _contextFactory)
 {
     this._contextFactory = _contextFactory;
 }
 public GuestRepository(IDBContextFactory context)
     : base(context)
 {
 }
 public PackageProductRepositoy(IDBContextFactory dbContextFactory) : base(dbContextFactory)
 {
 }
 public ProductRepo(IDBContextFactory factory)
 {
     this.factory = factory;
 }
Exemple #17
0
 public DBLogIn(IDBContextFactory chatterDbContextFactory)
 {
     this.chatterDbContextFactory = chatterDbContextFactory;
 }
Exemple #18
0
 public UserService(IDBContextFactory dbContext)
 {
     this.dbContext = dbContext;
 }
Exemple #19
0
 public DBComment(IDBContextFactory chatterDbContextFactory)
 {
     this.chatterDbContextFactory = chatterDbContextFactory;
 }
Exemple #20
0
 public DBServiceBase(ILogger logger, IDBContextFactory <TDBContext> dBContextFactory) : base(logger)
 {
     DBContextFactory = dBContextFactory;
 }
Exemple #21
0
 public DBOrganization(IDBContextFactory chatterDbContextFactory)
 {
     this.chatterDbContextFactory = chatterDbContextFactory;
 }
Exemple #22
0
 public DBGroup(IDBContextFactory chatterDbContextFactory)
 {
     this.chatterDbContextFactory = chatterDbContextFactory;
 }
Exemple #23
0
 public DBService(ILogger logger, IDBContextFactory <TDBContext> dBContextFactory) : base(logger, dBContextFactory)
 {
 }
Exemple #24
0
 public DBUser(IDBContextFactory chatterDbContextFactory)
 {
     this.chatterDbContextFactory = chatterDbContextFactory;
 }
Exemple #25
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SqlDataFactory"/> class.
 /// </summary>
 /// <param name="connectionString">The connection string for the TRGManagement database. </param>
 public SqlDataFactory()
 {
     this._contextFactory = new DBContextFactory();
 }
Exemple #26
0
 public TableRepository(IDBContextFactory context)
     : base(context)
 {
 }
Exemple #27
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SqlDataFactory"/> class.
 /// </summary>
 /// <remarks> Allows a mocked context factory to be injected. </remarks>
 internal SqlDataFactory(IDBContextFactory contextFactory)
 {
     this._contextFactory = contextFactory;
 }
 public SeatRepository(IDBContextFactory context)
     : base(context)
 {
 }
Exemple #29
0
 public DBFile(IDBContextFactory chatterDbContextFactory)
 {
     this.chatterDbContextFactory = chatterDbContextFactory;
 }