public async Task <IActionResult> GetSuppliers() { var suppliersEntities = await _suppliersRepository.GetSuppliersAsync(); //return Ok(suppliersEntities); return(Ok(_mapper.Map <IEnumerable <Supplier>, IEnumerable <SupplierDTO> >(suppliersEntities))); }
public async Task <IEnumerable <Supplier> > GetSuppliersAsync() { return(await _suppliersRepository.GetSuppliersAsync()); }