public ActionResult <TCheckout> Delete(int id) { var paymentObject = _checkout.GetPaymentById(id); if (paymentObject == null) { return(NotFound()); } _checkout.DeletePayment(paymentObject); _checkout.SaveChanges(); return(NoContent()); }