public EmployeeBenefitsController(IOptionsMonitor <ApiSettings> settings, IEmployeeRepository employeeRepository, IDependentRepository dependentRepository, IBenefitsRepository benefitsRepository) { _settings = settings.CurrentValue; _employeeRepository = employeeRepository; _dependentRepository = dependentRepository; _benefitsRepository = benefitsRepository; }
public AdminController(EmployeeRepository employeeRepository, DependentRepository dependentRepository, BenefitSettingsRepository benefitSettingsRepository, DiscountRepository discountRepository, DiscountTypeRepository discountTypeRepository, DiscountConditionTypeRepository discountConditionTypeRepository, StateRepository stateRepository) { EmployeeRepository = employeeRepository; DependentRepository = dependentRepository; BenefitSettingsRepository = benefitSettingsRepository; DiscountRepository = discountRepository; DiscountTypeRepository = discountTypeRepository; DiscountConditionTypeRepository = discountConditionTypeRepository; StateRepository = stateRepository; }
protected virtual void Dispose(bool disposing) { if (_disposed) { return; } if (disposing) { // free other managed objects that implement IDisposable only _repository.Dispose(); } // release any unmanaged objects set the object references to null _repository = null; _disposed = true; }
public async Task <Dependent> GetDependentAsync(IDependentRepository dependetRepository, Guid dependentId) { //todo: add logs and error checking return(await dependetRepository.GetDependentAsync(dependentId)); }
public async Task UpdateDependetAsync(IDependentRepository dependetRepository, UpdateDependentModel dependetToUpdate) { //todo: add logs and error checking await dependetRepository.UpdateDependentAsync(dependetToUpdate); }
public DependentDomain(IDependentRepository repository) { _repository = repository; }
public UpsertDependentHandler(IDependentRepository dependentRepository, IMapper mapper) { _dependentRepository = dependentRepository ?? throw new ArgumentNullException(nameof(dependentRepository)); _mapper = mapper ?? throw new ArgumentNullException(nameof(mapper)); }
public DependentComponent(IDependentRepository dependentRepository, IMapper mapper) { _dependentRepository = dependentRepository; _mapper = mapper; }
private async Task <List <InputEmployee> > GetInputEmployees(List <Employee> employees, IDependentRepository dependentRepository) { var inputEmployees = new List <InputEmployee>(); foreach (var employee in employees) { var eTemp = new InputEmployee(); eTemp.Id = employee.Id; eTemp.Name = $"{employee.FirstName} {employee.LastName}"; employee.Dependents = await dependentRepository.GetAllEmployeeDependentsAsync(employee.Id); foreach (var d in employee.Dependents) { var dTemp = new InputDependent(); dTemp.Id = d.Id; dTemp.Name = $"{d.FirstName} {d.LastName}"; eTemp.InputDependents.Add(dTemp); } inputEmployees.Add(eTemp); } return(inputEmployees); }
public async Task <List <EmpDependetsBenefitDetails> > GetEmployeeWithCurrentSalaryAsync(IEmployeeRepository employeeRepository, IDependentRepository dependentRepository, IBenefitsRepository benefitsRepository) { var employees = await employeeRepository.GetAllEmployeesAsync(); var inputEmployees = await GetInputEmployees(employees, dependentRepository); var medBenefits = await benefitsRepository.GetEmployeeMedBenefitsAsync(inputEmployees); medBenefits = AppendCurrentSalary(employees, medBenefits); return(medBenefits); }
public async Task <Employee> GetEmployeeWithDependentsAsync(IEmployeeRepository employeeRepository, IDependentRepository dependentRepository, Guid employeeId) { var employee = await employeeRepository.GetEmployeeWithDependentsAsync(employeeId); employee.Dependents = await dependentRepository.GetAllEmployeeDependentsAsync(employeeId); return(employee); }
public UnitOfWork(ApplicationDbContext context) { _context = context; Employees = new EmployeeRepository(context); Dependents = new DependentRepository(context); }
public DependentController(IDependentRepository repository) { this.repository = repository; }
public EmployeeCommandHandler(IEmployeeRepository employeeRepository, IDependentRepository dependentRepository, IUnitOfWork unitOfWork) { _employeeRepository = employeeRepository; _unitOfWork = unitOfWork; _dependentRepository = dependentRepository; }
public async Task AddDependetAsync(IDependentRepository dependetRepository, AddDependentModel addDependentModel) { //todo: add logs and error checking await dependetRepository.AddDependentAsync(addDependentModel); }
public EmployeeDomain(IEmployeeRepository repository, IDependentRepository repositoryDependent) { _repository = repository; _repositoryDependent = repositoryDependent; }
public EmployeeSeedBucketAction(IEmployeeRepository employeeRepository, IDependentRepository dependentRepository) { _employeeRepository = employeeRepository ?? throw new ArgumentNullException(nameof(employeeRepository)); _dependentRepository = dependentRepository ?? throw new ArgumentNullException(nameof(dependentRepository)); }
public DependentController(IDependentRepository dependentRepository) { _dependentRepository = dependentRepository; }
public DependentService(IDependentRepository dependentRepository) { _dependentRepository = dependentRepository; }
public DependentRepositoryFixture() { _repository = new DependentRepository(Context); _builder = new DependentBuilder(); _helper = new DependentHelper(Context); }