Ejemplo n.º 1
0
        public ActionResult PostComment(FormCollection form)
        {
            var comment = new Comment()
            {
                Name     = form["name"],
                Text     = form["text"],
                RecipeId = Guid.Parse(form["recipeId"]),
                Score    = Convert.ToInt32(form["score"])
            };

            var dbcon = new Db();

            dbcon.AddComment(comment);

            return(Redirect(form["callback"]));
        }
Ejemplo n.º 2
0
            public void CreatePost()
            {
                // check if comment valid

                Db.AddComment(Message);
            }