public SuppliersController(ISuppliersRepository suppliersRepository, IMapper mapper) { _suppliersRepository = suppliersRepository ?? throw new ArgumentNullException(nameof(suppliersRepository)); _mapper = mapper ?? throw new ArgumentNullException(nameof(mapper)); }
public UnitOfWork(ISuppliersRepository suppliers, IProductCategoriesRepository productCategories, IProductsRepository products, IProductsDbContext context) { Suppliers = suppliers; ProductCategories = productCategories; Products = products; _context = context; }
public IBOSuppliers BOSuppliers(ISuppliersRepository repo) { BOSuppliers boSuppliers = (BOSuppliers)BOSuppliers(); boSuppliers.Repository = repo; return(boSuppliers); }
public PricesService(IPricesRepository PriceRepo, IProductsRepository ProductRepo, ISuppliersRepository SuppliersRepo) { _pricesRepository = PriceRepo; _productsRepository = ProductRepo; _suppliersRepository = SuppliersRepo; }
public productdetailsController(IProductDetailsRepository repos, IMapper mapper, ISuppliersRepository Suppliersrepos, UserManager <IdentityUser> userManager) { _repos = repos; _Suppliersrepos = Suppliersrepos; _mapper = mapper; _userManager = userManager; }
public UnitOfWork(IApplicationDbContext context, ICategoriesRepository categories, IInventoriesRepository inventories, IProductsRepository products, IStatusesRepository statuses, IStocksRepository stocks, ISuppliersRepository suppliers, ITransactionsRepository transactions, IWholesalersRepository wholesalers) { _context = context; Categories = categories; Inventories = inventories; Products = products; Statuses = statuses; Stocks = stocks; Suppliers = suppliers; Transactions = transactions; Wholesalers = wholesalers; }
///<Summary> ///SuppliersCollectionCount ///This method returns the collection count of BOSuppliers objects ///</Summary> ///<returns> ///Int32 ///</returns> ///<parameters> /// ///</parameters> public static Int32 SuppliersCollectionCount(ISuppliersRepository iSuppliersRepository) { Doing(null); try { Int32 objCount = iSuppliersRepository.SelectAllCount(); return(objCount); } catch (Exception ex) { Failed(null, ex); Handle(null, ex); return(-1); } }
///<Summary> ///SuppliersCollection ///This method returns the collection of BOSuppliers objects ///</Summary> ///<returns> ///IList[IBOSuppliers] ///</returns> ///<parameters> /// ///</parameters> public static IList <IBOSuppliers> SuppliersCollection(ISuppliersRepository iSuppliersRepository) { Doing(null); try { IList <IBOSuppliers> boSuppliersCollection = new List <IBOSuppliers>(); IList <IDAOSuppliers> daoSuppliersCollection = iSuppliersRepository.SelectAll(); Done(null); foreach (IDAOSuppliers daoSuppliers in daoSuppliersCollection) { boSuppliersCollection.Add(new BOSuppliers(daoSuppliers)); } return(boSuppliersCollection); } catch (Exception ex) { Failed(null, ex); Handle(null, ex); return(null); } }
public SuppliersGetService(ISuppliersRepository suppliersRepository) { _suppliersRepository = suppliersRepository; }
public IQueryable <Suppliers> GetSuppliers([Service] ISuppliersRepository repository) => repository.GetSuppliers();
public SuppliersService(ISuppliersRepository repo) { _repo = repo; }
public SuppliersDeleteService(ISuppliersRepository suppliersRepository) { _suppliersRepository = suppliersRepository; }
public SuppliersPublishService(ISuppliersRepository suppliersRepository) { _suppliersRepository = suppliersRepository; }
public static void ChooseOperatioForSuppliersRepository(ISuppliersRepository suppliersRepository, OperationForSuppliersRepository suppliersRepositoryOperation) { switch (suppliersRepositoryOperation) { case OperationForSuppliersRepository.ShowAll: ShowAllSuppliers(suppliersRepository.Get()); break; case OperationForSuppliersRepository.ShowById: Console.WriteLine("Enter supplier Id: "); if (int.TryParse(Console.ReadLine(), out var supplierId)) { Console.WriteLine(suppliersRepository.Get(supplierId)); } break; case OperationForSuppliersRepository.Add: Supplier supplierToAdd = CreateSupplierToAdd(); suppliersRepository.Add(supplierToAdd); Console.WriteLine("New supplier added"); break; case OperationForSuppliersRepository.Update: Supplier supplierToUpdate = null; Console.Write("Enter supplier Id to update: "); if (int.TryParse(Console.ReadLine(), out var supplierIdToUpdate)) { supplierToUpdate = suppliersRepository.Get(supplierIdToUpdate); } Console.Write("Enter new Name: "); supplierToUpdate.Name = Console.ReadLine(); suppliersRepository.Update(supplierToUpdate); Console.WriteLine("Supplier updated"); break; case OperationForSuppliersRepository.Delete: Console.WriteLine("Enter supplier Id: "); if (int.TryParse(Console.ReadLine(), out var supplierIdToDelete)) { suppliersRepository.Delete(supplierIdToDelete); Console.WriteLine("Supplier deleted"); } break; case OperationForSuppliersRepository.GetSupplierInfoWithMaxQuantityOfGoods: var maxQuantityOfGoodsSupplier = suppliersRepository.GetSupplierInfoWithMaxQuantityOfGoods(); Console.WriteLine($"Supplier with max quantity of goods: {maxQuantityOfGoodsSupplier}"); break; case OperationForSuppliersRepository.GetSupplierInfoWithMinQuantityOfGoods: var minQuantityOfGoodsSupplier = suppliersRepository.GetSupplierInfoWithMaxQuantityOfGoods(); Console.WriteLine($"Supplier with max quantity of goods: {minQuantityOfGoodsSupplier}"); break; default: Environment.Exit(0); break; } }
public SuppliersUpdateService(ISuppliersRepository suppliersRepository) { _suppliersRepository = suppliersRepository; }
public SuppliersController(ILogger <SuppliersController> logger, ISuppliersRepository suppliers) { _logger = logger; _suppliers = suppliers; }
public SuppliersController(ISuppliersRepository suppliersRepository, IMapper mapper) { _suppliersRepository = suppliersRepository; _mapper = mapper; }
public SuppliersController(IConfigurationRoot config, ISuppliersRepository supplierRepo, IHostingEnvironment env) { this.supplierRepo = supplierRepo; this.env = env; this.config = config; }
/// <summary> /// Конструктор сервісу постачальників /// </summary> /// <param name="suppliersRepository">Екземпляр репозиторію постачальників</param> public SuppliersService(ISuppliersRepository suppliersRepository) { this.suppliersRepository = suppliersRepository; }
public SuppliersController1(ISuppliersRepository repos, IMapper mapper) { _repos = repos; _mapper = mapper; }