public IActionResult OnPostGet(CourseType courseType) { ResultObject <PMasterDataCourse> result = new ResultObject <PMasterDataCourse>(); try { result.Entity.CourseList = _CourseSrv.GetAllByType(courseType); result.Entity.ClassList = _CourseSrv.GetCourseClassList(); } catch (Exception ex) { result.ErrorMsg = ex.Message; } return(new JsonResult(result)); }