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"])); }
public void CreatePost() { // check if comment valid Db.AddComment(Message); }