Exemplo n.º 1
0
        public UnitOfWork(ApplicationDbContext context)
        {
            _context = context;

            Clients        = new ClientRepository(_context);
            ClientsHistory = new ClientHistoryRepository(_context);

            ClientUsers        = new ClientUserRepository(_context);
            ClientUsersHistory = new ClientUserHistoryRepository(_context);

            Customers        = new CustomerRepository(_context);
            CustomersHistory = new CustomerHistoryRepository(_context);

            ClientCustomers        = new ClientCustomerRepository(_context);
            ClientCustomersHistory = new ClientCustomerHistoryRepository(_context);

            CustomerLocations        = new CustomerLocationRepository(_context);
            CustomerLocationsHistory = new CustomerLocationHistoryRepository(_context);

            Products        = new ProductRepository(_context);
            ProductsHistory = new ProductHistoryRepository(_context);

            WorkOrders        = new WorkOrderRepository(_context);
            WorkOrdersHistory = new WorkOrderHistoryRepository(_context);
        }
Exemplo n.º 2
0
 /// <summary>
 ///  Repositories for interaction with the database
 /// </summary>
 static Unit()
 {
     contex = new StoreDbContex("StoreDb");
     StatisticsRepository         = new StatisticRepository(contex);
     ContactInformationRepository = new ContactInformationRepository(contex);
     CategoryRepository           = new CategoryRepository(contex);
     ClientUserRepository         = new ClientUserRepository(contex);
     CompanyProviderRepository    = new CompanyProviderRepository(contex);
     EmployeeRepository           = new EmployeeRepository(contex);
     PositionEmployeeRepository   = new PositionEmployeeRepository(contex);
     InvoiceForPurchaseRepository = new InvoiceForPurchaseRepository(contex);
     ProductRepository            = new ProductRepository(contex);
     SalesInvoiceRepository       = new SalesInvoiceRepository(contex);
     CompanyСustomerRepository    = new CompanyCustomerRepository(contex);
     ProductInStockRepository     = new ProductInStockRepository(contex);
 }
Exemplo n.º 3
0
 public UserController(UserService userService, ClientUserRepository clientUserRepository, MqttClientService clientService)
 {
     this.userService          = userService;
     this.clientUserRepository = clientUserRepository;
     this.clientService        = clientService;
 }
Exemplo n.º 4
0
 public ClientController(ClientUserRepository clientUser, MqttClientService service)
 {
     this.clientUser = clientUser;
     this.service    = service;
 }
Exemplo n.º 5
0
 public DeviceController(DeviceRepository deviceRepository, ClientUserRepository clientUserRepository, MqttClientService clientService)
 {
     this.deviceRepository     = deviceRepository;
     this.clientUserRepository = clientUserRepository;
     this.clientService        = clientService;
 }