/// <summary> /// /// </summary> /// <param name="data"></param> /// <returns></returns> public static IEnumerable <AjaxJobseekerSearchViewModel> ToAjaxJobseekerSearchViewModelList(this IList <JobSeekerSearchModel> data) { if (data != null) { var modelList = new List <AjaxJobseekerSearchViewModel>(); foreach (var record in data) { AjaxJobseekerSearchViewModel model = record.ToAjaxJobseekerSearchModel(); modelList.Add(model); } return(modelList as IEnumerable <AjaxJobseekerSearchViewModel>); } return(null); }
/// <summary> /// /// </summary> /// <param name="model"></param> /// <returns></returns> public static AjaxJobseekerSearchViewModel ToAjaxJobseekerSearchModel(this JobSeekerSearchModel model) { if (model != null) { AjaxJobseekerSearchViewModel ajaxModel = new AjaxJobseekerSearchViewModel { DOB = model.DOB, FirstName = model.FirstName, Gender = model.Gender, Id = model.Id, LastName = model.LastName, MiddleName = model.MiddleName, Salutation = model.Salutation, SingleLineJobseekerSearch = JobseekerSearchModelToSingleLineValueResolver.Resolve(model), // model.Id + " " + model.Salutation + " " + model.FirstName + " "+ " " + model.MiddleName + model.LastName, Type = model.Type }; return(ajaxModel); } return(null); }