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