public async Task <ActionResult <IEnumerable <Models.SuppliersDto> > > GetSuppliers(int page = 0, int itemsPerPage = 0) { var suppliersEntities = await _suppliersRepository.GetSuppliers(page, itemsPerPage); var _results = _mapper.Map <IEnumerable <Models.SuppliersDto> >(suppliersEntities); return(Ok(_results)); }
protected async Task UpdateDataGridViewSuppliers() { var suppliers = await _suppliersRepository.GetSuppliers(); dataGridViewSuppliers.Rows.Clear(); dataGridViewSuppliers.Columns[1].Width = suppliers.Count > 4 ? 262 : 279; foreach (var supplier in suppliers) { dataGridViewSuppliers.Rows.Add(new[] { supplier.OGRN.ToString(), supplier.Name, supplier.ContactNumber }); } ClearDataGridViewSuppliersSelection(); }
public IQueryable <Suppliers> GetSuppliers([Service] ISuppliersRepository repository) => repository.GetSuppliers();
public IEnumerable <Supplier> Get() { _logger.LogInformation("Someone get suppliers info"); return(_suppliers.GetSuppliers()); }