public IActionResult AddPost(ForumPostUserVM forumPost) { var user = authProvider.GetCurrentUser(); forumPost.CurrentUser = userDAL.GetUser(user.Username); forumDAO.SaveNewPost(forumPost.Post); return(RedirectToAction("Index", "Forum")); }
public IActionResult AddPost() { var user = authProvider.GetCurrentUser(); ForumPostUserVM vm = new ForumPostUserVM(); vm.CurrentUser = userDAL.GetUser(user.Username); return(View(vm)); }