public async Task <ActionResult> AddComment(CommentModel model, string id) { if (ModelState.IsValid) { await commentRepository.AddCommentToCard(id, model); return(RedirectToAction("Card", new { id = id })); } var card = await cardRepository.GetCardById(id); ViewBag.CardName = card.Name; ViewBag.Id = id; return(View(model)); }