public ChecklistItemChecklistController(ConfiguracaoContext context, IOptionsSnapshot <ConfiguracaoSettings> settings, IConfiguracaoIntegrationEventService configuracaoIntegrationEventService, IStringLocalizer <ChecklistItemChecklistController> localizer)
 {
     _configuracaoContext = context ?? throw new ArgumentNullException(nameof(context));
     _configuracaoIntegrationEventService = configuracaoIntegrationEventService ?? throw new ArgumentNullException(nameof(configuracaoIntegrationEventService));
     _settings  = settings.Value;
     _localizer = localizer;
 }
Exemple #2
0
 public ConfiguracaoIntegrationEventService(IEventBus eventBus, ConfiguracaoContext configuracaoContext,
                                            Func <DbConnection, IIntegrationEventLogService> integrationEventLogServiceFactory)
 {
     _configuracaoContext = configuracaoContext ?? throw new ArgumentNullException(nameof(configuracaoContext));
     _integrationEventLogServiceFactory = integrationEventLogServiceFactory ?? throw new ArgumentNullException(nameof(integrationEventLogServiceFactory));
     _eventBus        = eventBus ?? throw new ArgumentNullException(nameof(eventBus));
     _eventLogService = _integrationEventLogServiceFactory(_configuracaoContext.Database.GetDbConnection());
 }
Exemple #3
0
        public SetorController(ConfiguracaoContext context, IOptionsSnapshot <ConfiguracaoSettings> settings, IConfiguracaoIntegrationEventService setorIntegrationEventService)
        {
            _setorContext = context ?? throw new ArgumentNullException(nameof(context));
            _setorIntegrationEventService = setorIntegrationEventService ?? throw new ArgumentNullException(nameof(setorIntegrationEventService));
            _settings = settings.Value;

            ((DbContext)context).ChangeTracker.QueryTrackingBehavior = QueryTrackingBehavior.NoTracking;
        }