// GET: Employees public async Task <IActionResult> Index() { var employees = await _repository.GetAllEmployeesAsync(); foreach (var employee in employees) { employee.BenefitCostPerYear = await _discountRepository.GetTotalBenefitCost(employee.EmployeeId, employee.FirstName, employee.LastName, employee.Dependents); } return(View(employees)); }
public async Task <ActionResult <IEnumerable <EmployeeViewModel> > > GetEmployees() { return(await _repository.GetAllEmployeesAsync()); }