Exemple #1
0
        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());
 }