public VacationContext init() { if (context == null) { var optionsBuilder = new DbContextOptionsBuilder <VacationContext>(); string mySqlConnectionStr = "server=localhost; port=3306; database=vacationtask; user=root; password=; Persist Security Info=False; Connect Timeout=300"; optionsBuilder.UseMySql(mySqlConnectionStr); _context = new VacationContext(optionsBuilder.Options); return(_context); } return(context); }
public VacationRepository(IDbFactory dbFactory) { this.dbFactory = dbFactory; this._context = dbFactory.init(); }
public EmployeeRepository(VacationContext context) : base(context) { }
//public IDbFactory DbFactory { get; } public UnitOfWork(IDbFactory dbFactory, VacationContext context) { this.dbFactory = dbFactory; this._context = dbFactory.init(); }
public EmployeeRequestRepository(IDbFactory dbfactory) { this.dbFactory = dbfactory; this._context = dbFactory.init(); }
public EmployeeBalanceRepository(IDbFactory dbFactory) { this.dbFactory = dbFactory; this._context = dbFactory.init(); }
public VacationController(VacationContext context) { _context = context; }
//public IDbFactory DbFactory { get; } public UnitOfWork(IDbFactory dbFactory) { this.dbFactory = dbFactory; this._context = dbFactory.init(); }
public CompanyHolidayRepository(VacationContext context) : base(context) { }
public RepositoryBase(VacationContext context) { _dbContext = context; }
public VacationPolicyRepository(VacationContext context) : base(context) { }
public QueryHandler(VacationContext db) => _db = db;
public VacationRequestRepository(VacationContext context) : base(context) { }