public JsonResult GetAllPosts() { var allPosts = GetMethods.GetAllPosts(); return(new JsonResult { Data = allPosts, JsonRequestBehavior = JsonRequestBehavior.AllowGet }); }