public UnitOfWork() { _context = new RestaurantContext(); Foods = new FoodRepository(_context); Extras = new ExtraRepository(_context); Specials = new SpecialRepository(_context); FoodPictures = new FoodPictureRepository(_context); }
/// <summary> /// Main program runs here /// </summary> public static void Main() { using (CarShopDataEntities carShopDataEntities = new CarShopDataEntities()) { ICarBrandRepository carBrandRepository = new CarBrandRepository(carShopDataEntities); IModelRepository modelRepository = new ModelRepository(carShopDataEntities); IExtraRepository extraRepository = new ExtraRepository(carShopDataEntities); IModelExtraSwitchRepository modelExtraSwitchRepository = new ModelExtraSwitchRepository(carShopDataEntities); IJava javarepo = new Java(); ILogic logic = new CarBrandLogic(carBrandRepository, modelRepository, extraRepository, modelExtraSwitchRepository, javarepo); ConsoleMenu(logic); } }
public UnitOfWork(IorwoodDbContext context) { _context = context; Category = new CategoryRepository(_context); Extra = new ExtraRepository(_context); Unit = new UnitRepository(_context); Product = new ProductRepository(_context); OrderHeader = new OrderHeaderRepository(_context); OrderDetails = new OrderDetailsRepository(_context); StockRepository = new StockRepository(_context); RefundHeader = new RefundHeaderRepository(_context); RefundDetail = new RefundDetailRepository(_context); CurrentMovement = new CurrentMovementRepositroy(_context); AccountingBook = new AccountingBookRepository(_context); UserApplication = new UserApplicationRepository(_context); }
public MainRepository(AppContext context) { _context = context; Calls = new CallRepository(_context); Users = new UserRepository(_context); Locations = new LocationRepository(_context); Groups = new GroupRepository(_context); Operations = new OperationRepository(_context); Roles = new RoleRepository(_context); Debits = new DebitRepository(_context); PenaltyTypes = new PenaltyTypeRepository(_context); Employees = new EmployeeRepository(_context); Extras = new ExtraRepository(_context); PayRolls = new PayRollRepository(_context); Salaries = new SalaryRepository(_context); DebitTypes = new DebitTypeRepository(_context); Penalties = new PenaltyRepository(_context); DebitPayments = new DebitPaymentRepository(_context); Administrators = new AdministratorRepository(_context); Savings = new SavingRepository(_context); Vacations = new VacationRepository(_context); RoleOperations = new RoleOperationRepository(_context); }