Exemple #1
0
        public ActionResult Index(Comment comment, int id)
        {
            if (ModelState.IsValid)
            {
                comment.EntryDate = DateTime.Now.Date;
                comment.DishID    = id;
                repository.InsertComment(comment);

                return(RedirectToAction("Index", "DishDetails", id));
            }

            return(View("Index"));
        }