public InvoiceContext(string connectionString, IMediator mediator, IPolicyAsyncExecutor resilientSqlExecutor)
        {
            if (string.IsNullOrWhiteSpace(connectionString))
            {
                throw new ArgumentException(nameof(connectionString));
            }

            _connectionString     = connectionString;
            _mediator             = mediator ?? throw new ArgumentNullException(nameof(mediator));
            _resilientSqlExecutor = resilientSqlExecutor ?? throw new ArgumentNullException(nameof(resilientSqlExecutor));
        }
        public InvoiceContext(string connectionString, IMediator mediator, IPolicyAsyncExecutor resilientSqlExecutor, Lazy <Task <GeneralChaosSetting> > generalChaosSettingFactory)
        {
            if (string.IsNullOrWhiteSpace(connectionString))
            {
                throw new ArgumentException(nameof(connectionString));
            }

            _connectionString           = connectionString;
            _mediator                   = mediator ?? throw new ArgumentNullException(nameof(mediator));
            _generalChaosSettingFactory = generalChaosSettingFactory ?? throw new ArgumentException(nameof(generalChaosSettingFactory));
            _resilientSqlExecutor       = resilientSqlExecutor ?? throw new ArgumentNullException(nameof(resilientSqlExecutor));
        }
 public ReportingRepository(ReportingContext reportingContext, IPolicyAsyncExecutor resilientAsyncSqlExecutor, IPolicySyncExecutor resilientSyncSqlExecutor)
 {
     _reportingContext          = reportingContext ?? throw new ArgumentNullException(nameof(reportingContext));
     _resilientAsyncSqlExecutor = resilientAsyncSqlExecutor ?? throw new ArgumentNullException(nameof(resilientAsyncSqlExecutor));
     _resilientSyncSqlExecutor  = resilientSyncSqlExecutor ?? throw new ArgumentNullException(nameof(resilientSyncSqlExecutor));
 }