public ActionResult Create(FormCollection collection) { // TODO: Add insert logic here var name = collection["Name"]; var newCateogry = new ASF.Entities.Category(); newCateogry.Name = name; newCateogry.ChangedOn = DateTime.Now; newCateogry.CreatedOn = DateTime.Now; try { newCateogry = categoryProcess.Add(newCateogry); return(RedirectToAction("Index")); } catch (Exception e) { throw new Exception(e.Message); //return View(); } }