public IPagedList <EducationDetailsHistory> EducationListPagedList(int userid) { List <GetEducationList_Result> list = _IEducationService.GetEducationList(userid); List <EducationDetailsHistory> ModelList = new List <EducationDetailsHistory>(); ModelList = list .Select(x => new EducationDetailsHistory() { EduDetID = x.EduDetID, DisciplineName = x.DisciplineName, EducationCategory = x.EducationCategory, PassingYear = x.PassingYear, Percentage = x.Percentage + " %", University = x.University }) .ToList(); int pageSize = 10; int pageIndex = 1; return(ModelList.ToPagedList(pageIndex, pageSize)); }
public async Task <IActionResult> GetEducationList() { try { var response = await _service.GetEducationList(); if (response != null) { return(Ok(response)); } return(StatusCode(StatusCodes.Status204NoContent)); } catch (Exception ex) { throw ex; } }
public string GetGuardianList(int typeID) { return(JsonConvert.SerializeObject(_educationService.GetEducationList(typeID))); }