Exemplo n.º 1
0
        public IActionResult AddPost(Post post)
        {
            postServer.Add(post);
            var user = userServer.FindById(post.UserId);

            return(Redirect($"/?username={user.UserName}"));
        }
Exemplo n.º 2
0
 public IActionResult AddPost(Post post)
 {
     postServer.Add(post);
     return(RedirectToAction(nameof(Index)));
 }