public ActionResult Edit(NewsTypeModel type) { if (ModelState.IsValid) { type.Save(_messageDao); return RedirectToAction("Index"); } return View(type); }
public ActionResult Edit(string id) { var result = new NewsTypeModel(_messageDao.NewsTypeDao.Get(id)); return View(result); }
public ActionResult Create() { var result = new NewsTypeModel { Name = "new message type" }; return View(result); }