public ActionResult Create(StreamLinkFormModel model) { var item = Mapper.Map<StreamLinkFormModel, StreamLink>(model); GetSession.Save(item); return RedirectToAction("Index"); }
public ActionResult Edit(StreamLinkFormModel model) { if (ModelState.IsValid) { var item = GetSession.Get<StreamLink>(model.Id); Mapper.Map<StreamLinkFormModel, StreamLink>(model, item); GetSession.Update(item); return RedirectToAction("Index"); } return View(model); }
public ActionResult Create() { var model = new StreamLinkFormModel(); return View(model); }