public IActionResult Update(long id, [FromBody] Payment payment) { bool result = false; try { if (payment == null || payment.ID != id) { return BadRequest(); } result = paymentBL.UpdateCategoryName(id, payment); if (result == false) { return NotFound(); } } catch (Exception e) { Console.WriteLine("Exception in getting Add payment", e); } return new NoContentResult(); }