Esempio n. 1
0
        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));
        }