public ActionResult Create(FormCollection collection) { try { // TODO: Add insert logic here CustomerModel model = new CustomerModel(); model.Age = int.Parse(collection["Age"]); model.Name = collection["Name"]; service.AddCustomer(model); return(RedirectToAction("Index")); } catch { return(View()); } }