public ActionResult Insert(int id, string name, string spec, int syear, DateTime bdate) { if (db.Insert(new Data { Id = id, Name = name, Spec = spec, SYear = syear, BDate = bdate })) { ViewBag.message = "Insert OK"; } else { ViewBag.message = "Insert fails"; } ViewBag.getall = db.GetAll(); return(View()); }