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()); }