public Factory() { DbContext = new DefaultContext(); AccountsService = new AccountsService(DbContext); ClientsService = new ClientsService(DbContext); OpeningsService = new OpeningsService(DbContext); DocumentsService = new DocumentsService(DbContext); ReportsService = new ReportsService(DbContext); DataInitializatorService = new DataInitializatorService(DbContext); ProfitLossService = new ProfitLossService(this); BalanceService = new BalanceService(this); AccountsPrintService = new AccountsPrintService(this); OpeningsPrintService = new OpeningsPrintService(this); DocumentsPrintService = new DocumentsPrintService(this); ReportsPrintService = new ReportsPrintService(this); ProfitLossPrintService = new ProfitAndLossPrintService(this); BalancePrintService = new BalancePrintService(this); }
public AccountsService(DefaultContext dbContext) { this.dbContext = dbContext; }
public ClientsService(DefaultContext dbContext) { this.dbContext = dbContext; }
public BalanceService(IFactory factory) { _factory = factory; _dbContext = _factory.GetDbContext(); }
public ProfitLossService(Factory factory) { _factory = factory; _dbContext = _factory.GetDbContext(); }
public OpeningsService(DefaultContext dbContext) { _dbContext = dbContext; }
public ReportsService(DefaultContext dbContext) { _dbContext = dbContext; }
public DocumentsService(DefaultContext dbContext) { _dbContext = dbContext; }