private bool checkVacaionDaysPost(EmployeeRequest employeeRequest) { List <VacationView> vacationViews = _employeeBalanceRepo.GetAllEmployeeBalances(); var vacationview = vacationViews.Find(v => v.employeeID == employeeRequest.EmployeeID && v.vacationID == employeeRequest.VacationID); return(employeeRequest.Days > (vacationview.Balance - vacationview.Used)); }
//public List<EmployeeBalance> GetAllEmployeeBalances() //{ // return _employeeBalanceRepo.GetAllEmployeeBalances(); //} public List <VacationView> GetAllEmployeeBalances() { return(_employeeBalanceRepo.GetAllEmployeeBalances()); }