public IActionResult AddPost(Post post) { postServer.Add(post); var user = userServer.FindById(post.UserId); return(Redirect($"/?username={user.UserName}")); }
public IActionResult AddPost(Post post) { postServer.Add(post); return(RedirectToAction(nameof(Index))); }