public JobWithRoles GetById(Guid jobId) { var job = JobsWithRoles.SingleOrDefault(j => j.Id == jobId); if (job != null) { job.Roles = PersonRolesExtended.Where(role => role.JobId == jobId).ToList(); } return(job); }
public JobWithRoles GetById(Guid jobId) { var job = JobsWithRoles.Single(j => j.Id == jobId); if (job != null) { job.Roles = PersonRolesExtended.Where(role => role.JobId == jobId).ToList(); job.RequiredEndorsements = _requiredEndorsementsWithName.Where(re => re.JobId == jobId).ToList(); } return(job); }