Ejemplo n.º 1
0
 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());
     }
 }