public ActionResult Create(Tags tags) { if (ModelState.IsValid) { db.Tags.Add(tags); db.SaveChanges(); return RedirectToAction("Index"); } return View(tags); }
public ActionResult Edit(Tags tags) { if (ModelState.IsValid) { db.Entry(tags).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Index"); } return View(tags); }