public ActionResult Edit(int id)
{
var customer = _context.Customers.SingleOrDefault(c => c.Id == id);
if (customer == null)
{
return HttpNotFound();
}
var viewModel = new CustomerFormViewModel
{
customer = customer,
MembershipTypes = _context.membershipType.ToList()
};
return View("CustomerForm", viewModel);
}