Ejemplo n.º 1
0
        public async Task <IActionResult> DeleteSupplier(int supplierId)
        {
            var supplierEntity = await _suppliersRepository.GetSupplier(supplierId);

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

            _suppliersRepository.DeleteSupplier(supplierEntity);
            await _suppliersRepository.SaveChanges();

            return(NoContent());
        }