public ActionResult SpjallbordContent(int ID, string Author, string Title, string Content) { ForumPostContent model = new ForumPostContent(); model.fp = rep.getForumPostByID(ID); model.fpc = rep.getForumPostComments(ID); return(View(model)); }
public ActionResult SpjallbordContent(string Author, int pid, string Content) { ForumPostComment fpc = new ForumPostComment(); fpc.Author = Author; fpc.Content = Content; fpc.date = DateTime.Now; fpc.PostID = pid; db.ForumPostComment.Add(fpc); db.SaveChanges(); ForumPostContent model = new ForumPostContent(); model.fp = rep.getForumPostByID(pid); model.fpc = rep.getForumPostComments(pid); return(View(model)); }