public PersonWithOthers GetById(Guid id) { var personWithOthers = _personRepository.GetById(id); personWithOthers.LeaveDetails = _leaveService.GetCurrentLeaveDetails(personWithOthers); return(personWithOthers); }
public PersonWithOthers GetById(Guid id) { var personWithOthers = _personRepository.GetById(id); if (personWithOthers.StaffId.HasValue) { personWithOthers.Evaluations = _evaluationRepository.EvaluationWithNames .Where(eval => eval.PersonId == id).ToList(); personWithOthers.LeaveDetails = _leaveService.GetCurrentLeaveDetails(personWithOthers); personWithOthers.StaffEndorsements = _endorsementService.ListStaffEndorsements(id); } return(personWithOthers); }