public TeamDTO GetById(Guid id)
        {
            Team    team    = _store.GetById(id);
            TeamDTO teamDTO = _mapper.Map <TeamDTO>(team);

            SetMembersHiringRate(teamDTO.Members);

            return(teamDTO);
        }
        private Decimal GetTotalHiringRate(Hire hire)
        {
            if (hire.TeamId.HasValue)
            {
                Team team = _teamStore.GetById(hire.TeamId.Value);

                return(_pricePolicyService.CalculateTeamHiringHourPrice(
                           team.Members.Select(e => e.HourRate).ToArray()));
            }

            Employee employee = _employeeStore.GetById(hire.EmployeeId.Value);

            return(_pricePolicyService.CalculateHiringHourPrice(employee.HourRate, 1));
        }