// GET: Admin/ContentText/Draft/<ModuleID> public ActionResult Draft(Guid id) { ContentText ct = new ContentText(id); ContentTextDraftViewModel contentText = new ContentTextDraftViewModel(ct); return(View(contentText)); }
public ActionResult Draft(ContentTextDraftViewModel contentTextDraftViewModel) { try { if (ModelState.IsValid) { ContentText contentText = new ContentText(contentTextDraftViewModel); contentText.SaveChanges(contentTextDraftViewModel); } return(RedirectToAction("edit", "pages", new { id = contentTextDraftViewModel.PageID })); } catch { return(View()); } }