public TrackingUserApplicationService(IAppUsageRecordRepository repository, IAppUsageRecordRepository backupRepository) { _repository = repository; if (_repository == null) { _repository = backupRepository; } _backupRepository = backupRepository; }
public TrackingUserApplicationService(ILogger <TrackingUserApplicationService> logger, IAppUsageRecordRepository repository, IAppUsageRecordRepository backupRepository) { logger = _logger ?? throw new ArgumentNullException(nameof(logger)); _repository = repository; if (_repository == null) { _repository = backupRepository; } _backupRepository = backupRepository; }