public UnitOfWork(AppDbContext context) { _context = context; RestaurantRepository = new RestaurantRepository(context); MealCategoryRepository = new MealCategoryRepository(context); MealTypeRepository = new MealTypeRepository(context); MealRepository = new MealRepository(context); RestaurantCategoryRepository = new RestaurantCategoryRepository(context); AreaRepository = new AreaRepository(context); RestaurantImageRepository = new RestaurantImageRepository(context); WorkingHourRepository = new WorkingHourRepository(context); MealContentRepository = new MealContentRepository(context); }
public UnitOfWork(SisanjeHrDbContext context) { _context = context; Admins = new AdminRepository(_context); Owners = new OwnerRepository(_context); Subscriptions = new SubscriptionRepository(_context); Countries = new CountryRepository(_context); Cities = new CityRepository(_context); Locations = new LocationRepository(_context); RegisteredUsers = new RegisteredUserRepository(_context); Workers = new WorkerRepository(_context); HairSalons = new HairSalonRepository(_context); HairSalonMethodsOfPayment = new HairSalonMethodsOfPaymentRepository(_context); MethodsOfPayment = new MethodOfPaymentRepository(_context); HairSalonWorkingHours = new HairSalonWorkingHoursRepository(_context); WorkingHours = new WorkingHourRepository(_context); HairSalonServices = new HairSalonServicesRepository(_context); Services = new ServiceRepository(_context); Appointments = new AppointmentRepository(_context); AppointmentServices = new AppointmentServicesRepository(_context); Reviews = new ReviewRepository(_context); FavoriteHairSalons = new FavoriteHairSalonRepository(_context); }