public ActionResult Create( section1Model section1Model) { if (ModelState.IsValid) { db.section1Model.Add(section1Model); db.SaveChanges(); //var email = new NewCommentEmail //{ // To = "*****@*****.**", // UserName = section1Model.ProjectName, // Comment = section1Model.ToString() //}; //email.Send(); return RedirectToAction("Edit","section1Model", new { id = section1Model.id }); } return View(section1Model); }
public ActionResult Edit( section1Model section1Model) { if (ModelState.IsValid) { db.Entry(section1Model).State = EntityState.Modified; db.SaveChanges(); return View(section1Model); } return View(section1Model); }