Esempio n. 1
0
 public async Task <List <DependentModel> > GetDependents(int employeeId)
 {
     using (var unitOfWork = _unitOfWorkFactory.CreateUnitOfWork())
     {
         return(await _dependentDal.GetDependents(unitOfWork, employeeId));
     }
 }
Esempio n. 2
0
        public async Task <BenefitsModel> GetEmployeeBenefits(int employeeId)
        {
            BenefitsModel model = null;

            using (var unitOfWork = _unitOfWorkFactory.CreateUnitOfWork())
            {
                var employee = await _employeeDal.GetEmployee(unitOfWork, employeeId);

                var dependents = await _dependentsDal.GetDependents(unitOfWork, employeeId);

                model = CalculateBenefitsAdjustment(employee, dependents);
            }
            return(model);
        }