public ActionResult List()
        {
            var service = new ParagraphService();
            var model = service.GetParagraphs();

            return Json(model, JsonRequestBehavior.AllowGet);
        }
Example #2
0
        //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);
        }