Example #1
0
        public BaseApiController()
        {
            _objectService = new ObjectService <UserViewModel>();

            #region Load Repository
            userRepository            = new UserRepository(_db);
            roleRepository            = new RoleRepository(_db);
            categoryRepository        = new CategoryRepository(_db);
            productRepository         = new ProductRepository(_db);
            supplierRepository        = new SupplierRepository(_db);
            priceRepository           = new PriceRepository(_db);
            productCategoryRepository = new ProductCategoryRepository(_db);
            purchaseRepository        = new PurchaseRepository(_db);
            receivedProductRepository = new ReceivedProductRepository(_db);
            saleRepository            = new SaleRepository(_db);
            #endregion
        }
Example #2
0
 /*
  * @description : Constructor class for testing or unit test
  */
 public ReceivedProductController(IDbPOS context, User user)
 {
     userDataLogin             = new UserViewModel(user);
     receivedProductRepository = new ReceivedProductRepository(context);
 }