public ActionResult GetAllPostOfStudent() { //var userInfo = dataAccess.GetUserInfoByID(2); var userInfo = (UserLoginModel)Session[Helper.Commons.USER_SEESION]; var list = new PostDataAccess().GetAllPostByUser(userInfo.UserID); // hard code var res = list.Select(x => new SubmittionModel() { Sub_ID = x.Sub_ID, Sub_Title = x.Sub_Title, Department_ID = userInfo.Department_ID, Department_Name = userInfo.Department, Description = x.Sub_Description, Created_Date = x.Created_Date.ToString() }).ToList(); return(Json(res.OrderBy(x => x.Created_Date), JsonRequestBehavior.AllowGet)); }