public ActionResult AddNew(string title, string description)
 {
     ArticleRepository repo = new ArticleRepository();
     ArticleModel model = new ArticleModel();
     model.CreatedBy = User.Identity.Name;
     DateTime now = DateTime.Now;
     model.CreatedDate = now;
     model.LastModifiedDate = now;
     model.Id = Guid.NewGuid();
     model.Title = title;
     model.Description = description;
     repo.AddNewArticle(model);
     return Json(true, JsonRequestBehavior.AllowGet);
 }
 public ActionResult GetMyArticles()
 {
     ArticleRepository repo = new ArticleRepository();
     var r = repo.GetMyArticles(User.Identity.Name);
     return Json(r, JsonRequestBehavior.AllowGet);
 }
 public ActionResult GetAll()
 {
     ArticleRepository repo = new ArticleRepository();
     var r = repo.GetAllArticles();
     return Json(r, JsonRequestBehavior.AllowGet);
 }
 public ActionResult EditArticle(string id, string title, string description)
 {
     ArticleRepository repo = new ArticleRepository();
     repo.EditArticle(id, title, description);
     return Json(true, JsonRequestBehavior.AllowGet);
 }
 public ActionResult DeleteArticle(string id)
 {
     ArticleRepository repo = new ArticleRepository();
     repo.DeleteArticle(id);
     return Json(true , JsonRequestBehavior.AllowGet);
 }