Exemple #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UnitOfWork"/> class.
 /// </summary>
 /// <param name="configuration">The IConfiguration instance.</param>
 /// <param name="logger">The NLog logger instance.</param>
 public UnitOfWork(IConfiguration configuration, ILogger logger)
 {
     this.databaseContext = new ControlPanelDbContext(configuration);
     this.logger          = logger;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="RepositoryBase{TObject}"/> class.
 /// </summary>
 /// <param name="databaseContext">The database context.</param>
 /// <param name="logger">The NLog logger instance.</param>
 public RepositoryBase(ControlPanelDbContext databaseContext, ILogger logger)
 {
     this.context = databaseContext;
     this.logger  = logger;
 }
Exemple #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UnitOfWork"/> class.
 /// This constructor signature exists for integration tests purposes only.
 /// </summary>
 /// <param name="databaseContext">The ControlPanelDbContext instance.</param>
 /// <param name="logger">The NLog logger instance.</param>
 public UnitOfWork(ControlPanelDbContext databaseContext, ILogger logger)
 {
     this.databaseContext = databaseContext;
     this.logger          = logger;
 }