public ActionResult Pay(TicketAmountViewModel viewModel) { var customers = db.Customers.Where(m => m.FirstName == viewModel.FirstName).First(); customers.Paid = true; db.Entry(customers).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Confirmation")); }
public ActionResult Pay(Customers customers) { var viewModel = new TicketAmountViewModel(); { viewModel.Cost = customers.Cost; viewModel.FirstName = customers.FirstName; } return(View(viewModel)); }