public ActionResult Edit(int?id) { PaymentMethod paymentMethod; if (id.HasValue) { paymentMethod = PaymentMethods.GetByID(id.Value); } else { paymentMethod = new PaymentMethod(); } return(View(paymentMethod)); }