public async Task <IActionResult> GetAllTimesheets(int page, int pageSize, string search) { Logger.LogInformation($"Calling api GetAllTimesheets page: {page}, pageSize : {pageSize} & search : {search}"); Employee currentEmployee = await _employeeService.GetByUserId(CurrentUser.UserId); if (currentEmployee == null) { throw new ArgumentNullException(nameof(currentEmployee), "Employee info for current user does not exist."); } return(Ok(await _timesheetService.GetAllAsync(currentEmployee.Id, page, pageSize, search))); }