public UnitOfWork(TicketContext context, IEventBus eventBus)
 {
     _context         = context;
     _eventBus        = eventBus;
     TicketCategories = new TicketCategoryRepository(context);
     Tickets          = new TicketRepository(context);
     EmpireQueues     = new EmpireQueueRepository(context);
 }
Exemplo n.º 2
0
 public UnitOfWork(TerminalContext context, IEventBus eventBus, IHubContext <TerminalHub> terminalHub)
 {
     _context           = context;
     _eventBus          = eventBus;
     _hub               = terminalHub;
     Terminals          = new TerminalRepository(context);
     BreakLogEntries    = new BreakLogEntryRepository(context);
     TicketCategories   = new TicketCategoryRepository(context);
     TerminalCategories = new TerminalCategoryRepository(context);
 }
 public UnitOfWork(QueueContext context, IEventBus eventBus, IHubContext <EmpireQueueHub> empireQueueHub)
 {
     _hub               = empireQueueHub;
     _context           = context;
     _eventBus          = eventBus;
     EmpireQueues       = new QueueRepository(context);
     Tickets            = new TicketRepository(context);
     TicketCategories   = new TicketCategoryRepository(context);
     TerminalCategories = new TerminalCategoryRepository(context);
     TerminalTickets    = new TerminalTicketRepository(context);
     Terminals          = new TerminalRepository(context);
 }
Exemplo n.º 4
0
        public UnitOfWork(SettingsContext context, IEventBus eventBus)
        {
            _context         = context;
            _eventBus        = eventBus;
            TicketCategories = new TicketCategoryRepository(context);
            Terminals        = new TerminalRepository(context);
            Signages         = new SignageRepository(context);

            //var signageSyncCommand = new SyncSignagesCommand(Signages.GetAll());
            //SourceEvent(signageSyncCommand);

            //var terminalsSyncCommand = new SyncTerminalsCommand(Terminals.GetAll());
            //SourceEvent(terminalsSyncCommand);
        }
Exemplo n.º 5
0
 public UnitOfWork(AppDbContext context)
 {
     Users                  = new UserRepository(context);
     Airports               = new AirportRepository(context);
     Airlines               = new AirlineRepository(context);
     Luggages               = new LuggageRepository(context);
     Customers              = new CustomerRepository(context);
     Orders                 = new OrderRepository(context);
     Flights                = new FlightRepository(context);
     Dates                  = new DateRepository(context);
     DateFlights            = new DateFlightRepository(context);
     TicketCategories       = new TicketCategoryRepository(context);
     FlightTicketCategories = new FlightTicketCategoryRepository(context);
     Tickets                = new TicketRepository(context);
     _context               = context;
 }