public ActionResult List() { var service = new ParagraphService(); var model = service.GetParagraphs(); return Json(model, JsonRequestBehavior.AllowGet); }
//public void Send(int id, string text) public void Send(dynamic stuff) { var id = (int)stuff["id"]; var text = stuff["text"]; text = HttpUtility.HtmlDecode(text); var service = new ParagraphService(); service.UpdateParagraph(id, text); var paragraphs = service.GetParagraphs(); Clients.reloadParagraphs(paragraphs); }