//ID HERE DOES NOT CAPTURE VALUE, (BECAUSE VALUE IS IN OTHER CONTROLLER POSSIBLY?) public ActionResult Details(int id) { var userId = Guid.Parse(User.Identity.GetUserId()); var service = new ReplyServices(userId); var model = service.GetEntryById(id); return(View(model)); }
public ActionResult ViewEntryReplies(int journalEntryId) { var userId = Guid.Parse(User.Identity.GetUserId()); var service = new ReplyServices(userId); var model = service.GetEntryReplies(journalEntryId); return(View(model)); }
public ActionResult PublicJournalEntries(PublicOrPrivate publicPost) { var userId = Guid.Parse(User.Identity.GetUserId()); var service = new ReplyServices(userId); var model = service.GetPublicPosts(publicPost); return(View(model)); }
public ActionResult Create(ReplyCreate model) { if (!ModelState.IsValid) { return(View(model)); } var userId = Guid.Parse(User.Identity.GetUserId()); var service = new ReplyServices(userId); if (service.CreateReply(model)) { TempData["SaveResult"] = "Your reply has been saved."; return(RedirectToAction("Index")); } ModelState.AddModelError("", "Resource could not be created."); return(View(model)); }