public IList <UsersEducationViewModel> GetEducationByUserID(Guid UserID) { IList <UsersEducationViewModel> educations = new List <UsersEducationViewModel>(); try { educations = _context.usp_UsersEducation_GetByUserID(UserID) .Select(x => new UsersEducationViewModel { Id = x.Id, CourseSpecialization = x.CourseSpecialization, Institute = x.Institute, GPA = x.GPA, StartPeriod = x.StartPeriod, EndPeriod = x.EndPeriod, Comments = x.Comments, IsActive = x.IsActive, UserID = x.UserID, CreatedBy = x.CreatedBy, UpdatedBy = x.UpdatedBy, CreatedDate = x.CreatedDate, UpdatedDate = x.UpdatedDate }).ToList(); } catch (Exception ex) { throw ex; } return(educations); }