public ActionResult Edit(string id) { // TODO: to retrieve the model from the data store var model = new Post(); return View(model); }
public ActionResult Edit(Post model) { if (!ModelState.IsValid) { return View(model); } // TODO: update model in data store return RedirectToAction("Index"); }
public ActionResult Create() { var model = new Post(); return View(model); }