public async Task <IReadOnlyList <TraceDto> > GetActiveTracesAsync(DateTime from, DateTime toDateTime) { if (from > toDateTime) { throw new BusinessValidationException(TextConstants.DateIntervalErrorMessage); } var fromLocalDate = LocalDate.FromDateTime(from); var toLocalDate = LocalDate.FromDateTime(toDateTime); var traces = await _traceRepository.GetAllTracesForTenantAsync(t => t.State == TraceState.Active && t.DueDate >= fromLocalDate && t.DueDate <= toLocalDate); return(ConvertToTraceDto(traces)); }