예제 #1
0
        public async Task <IActionResult> GetSupplier(int id)
        {
            var supplierEntity = await _suppliersRepository.GetSupplierAsync(id);

            if (supplierEntity == null)
            {
                return(NotFound());
            }

            //return Ok(supplierEntity);
            return(Ok(_mapper.Map <Supplier, SupplierDTO>(supplierEntity)));
        }