public JsonResult GetPostDetailsById(long postId) { Post objPost = null; logginghelper.Log(LoggingLevels.Info, "Class: " + classname + " :: GetPostDetailsById - Begin"); try { objPost = dataaccess.GetPostDetailsById(postId); } catch (Exception ex) { logginghelper.Log(LoggingLevels.Error, "Class: " + classname + " :: GetPostDetailsById" + ex); } logginghelper.Log(LoggingLevels.Info, "Class: " + classname + " :: GetPostDetailsById - Begin"); return(Json(objPost, JsonRequestBehavior.AllowGet)); }
public JsonResult SaveComment(Comment objComment) { logginghelper.Log(LoggingLevels.Info, "Class: " + classname + " :: SaveComment - Begin"); ResponseDTO response = new ResponseDTO(); try { response = dataaccess.SaveComment(objComment); ViewBag.PostUrlSlug = dataaccess.GetPostDetailsById(objComment.Comment_PostId).PostUrlSlug; } catch (Exception ex) { logginghelper.Log(LoggingLevels.Error, "Class: " + classname + " :: SaveComment " + ex); } logginghelper.Log(LoggingLevels.Info, "Class: " + classname + " :: SaveComment - Begin"); return(Json(response)); }