public SaleService(ISaleRepository saleRepo, IProductRepository productRepo, ISalesRepresentativeRepository salerepRepo)
        {
            if (saleRepo == null)
                throw new ArgumentNullException(nameof(saleRepo));

            if (productRepo == null)
                throw new ArgumentNullException(nameof(productRepo));

            if (salerepRepo == null)
                throw new ArgumentNullException(nameof(salerepRepo));

            SaleRepository = saleRepo;
            ProductRepository = productRepo;
            SalesRepRepository = salerepRepo;
        }
Пример #2
0
        public SaleService(ISaleRepository saleRepo, IProductRepository productRepo, ISalesRepresentativeRepository salerepRepo)
        {
            if (saleRepo == null)
            {
                throw new ArgumentNullException(nameof(saleRepo));
            }

            if (productRepo == null)
            {
                throw new ArgumentNullException(nameof(productRepo));
            }

            if (salerepRepo == null)
            {
                throw new ArgumentNullException(nameof(salerepRepo));
            }

            SaleRepository     = saleRepo;
            ProductRepository  = productRepo;
            SalesRepRepository = salerepRepo;
        }
 public FranchiseeUserController(ISalesRepresentativeRepository salesRepresentativeRepository)
 {
     _salesRepresentativeRepository = salesRepresentativeRepository;
 }