예제 #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"]));
        }
예제 #2
0
파일: Program.cs 프로젝트: vaf888/studies
            public void CreatePost()
            {
                // check if comment valid

                Db.AddComment(Message);
            }