public ApplicationDbContext(
     DbContextOptions options,
     IDomainEventService domainEventService,
     IDateTime dateTime, IConfiguration configuration) : this(options)
 {
     _domainEventService = domainEventService;
     _configuration      = configuration;
     _dateTime           = dateTime;
 }
示例#2
0
 public CoreDbContext(
     DbContextOptions <CoreDbContext> options,
     ISessionUserService sessionUserService,
     IDomainEventService domainEventService)
     : base(options)
 {
     _sessionUserService = sessionUserService;
     _domainEventService = domainEventService;
 }
 public ApplicationDbContext(
     DbContextOptions options,
     ICurrentUserService currentUserService,
     IDomainEventService domainEventService,
     IDateTime dateTime) : base(options)
 {
     _currentUserService = currentUserService;
     _domainEventService = domainEventService;
     _dateTime           = dateTime;
 }
示例#4
0
 public ApplicationDbContext(
     DbContextOptions <ApplicationDbContext> options,
     IIdentityService identityService,
     IDomainEventService domainEventService,
     IDateTime dateTime) : base(options)
 {
     _identityService    = identityService;
     _domainEventService = domainEventService;
     _dateTime           = dateTime;
 }
示例#5
0
 public MoviesDBContext(
     DbContextOptions <MoviesDBContext> options,
     ICurrentUserService currentUserService,
     IDomainEventService domainEventService,
     IDateTime dateTime) : base(options)
 {
     _currentUserService = currentUserService;
     _domainEventService = domainEventService;
     _dateTime           = dateTime;
 }
示例#6
0
 public ApplicationDbContext(
     DbContextOptions options,
     IOptions <OperationalStoreOptions> operationalStoreOptions,
     IDomainEventService domainEventService,
     IDateTime dateTime,
     ILogger <ApplicationDbContext> logger) : base(options)
 {
     _domainEventService = domainEventService;
     _dateTime           = dateTime;
     _logger             = logger;
 }
示例#7
0
 public UnitOfWork(IDapperConnectionFactory connectionFactory,
                   IDomainEventService domainEventService,
                   ICurrentUserService currentUserService, IDateTime dateTime)
 {
     _connectionFactory  = connectionFactory;
     _domainEventService = domainEventService;
     _currentUserService = currentUserService;
     _dateTime           = dateTime;
     _integrationEvents  = new List <IntegrationEventLogEntry>();
     _changes            = new List <DatabaseOperationData>();
 }
 public ApplicationDbContext(
     DbContextOptions options,
     IOptions <OperationalStoreOptions> operationalStoreOptions,
     ICurrentUserService currentUserService,
     IDateTime dateTime,
     IDomainEventService domainEventService) : base(options, operationalStoreOptions)
 {
     _dateTime           = dateTime;
     _domainEventService = domainEventService;
     _currentUserService = currentUserService;
 }
        public SurveyContext(DbContextOptions options, IDomainEventService domainEventService, IUserService userService, ILogger <SurveyContext> logger) : base(options)
        {
            if (options == null)
            {
                throw new ArgumentNullException(nameof(options));
            }

            _userService        = userService ?? throw new ArgumentNullException(nameof(userService));
            _logger             = logger ?? throw new ArgumentNullException(nameof(logger));
            _domainEventService = domainEventService ?? throw new ArgumentNullException(nameof(domainEventService));
        }
示例#10
0
        /// <summary>
        /// Create transactional domain events scope.
        /// </summary>
        /// <param name="domainEventService">Service that notifies subscribers when domain events raised.</param>
        public EntityDomainEventTransactionScope(IDomainEventService domainEventService)
        {
            // TODO: Allow wrapping EntityDomainEventTransactionScope
            if (EntityDomainEventTransactionScope.Current != null)
            {
                throw new DomainException($"Cannot create new {nameof(EntityDomainEventTransactionScope)}: outer {nameof(EntityDomainEventTransactionScope)} already exists and wrapping {nameof(EntityDomainEventTransactionScope)}s is not allowed");
            }

            this.domainEventService = domainEventService;
            EntityDomainEventTransactionScope.current.Value = this;
        }
 public TrackerDbContext(
     DbContextOptions options,
     ICurrentUserService currentUserService,
     IDateTimeService dateTimeService,
     IDomainEventService domainEventService,
     IOptions <OperationalStoreOptions> operationalStoreOptions)
     : base(options)
 {
     this.options                 = options;
     this.currentUserService      = currentUserService;
     this.dateTimeService         = dateTimeService;
     this.domainEventService      = domainEventService;
     this.operationalStoreOptions = operationalStoreOptions;
 }
示例#12
0
        public ApplicationDbContext(
            DbContextOptions options,
            IOptions <OperationalStoreOptions> operationalStoreOptions,
            ICurrentUserService currentUserService,
            IDomainEventService domainEventService,
            IDateTime dateTime
            ) : base(options)
        {
            ChangeTracker.LazyLoadingEnabled = false;

            _dateTime           = dateTime;
            _currentUserService = currentUserService;
            _domainEventService = domainEventService;
        }
 public ApplicationDbContext(
     DbContextOptions options,
     IOptions <OperationalStoreOptions> operationalStoreOptions,
     ICurrentUserService currentUserService,
     IDomainEventService domainEventService,
     IDateTime dateTime) : base(options, operationalStoreOptions)
 {
     if (options is null)
     {
         throw new System.ArgumentNullException(nameof(options));
     }
     if (operationalStoreOptions is null)
     {
         throw new System.ArgumentNullException(nameof(operationalStoreOptions));
     }
     _currentUserService = currentUserService ?? throw new System.ArgumentNullException(nameof(currentUserService));
     _domainEventService = domainEventService ?? throw new System.ArgumentNullException(nameof(domainEventService));
     _dateTime           = dateTime ?? throw new System.ArgumentNullException(nameof(dateTime));
 }
示例#14
0
 public ApplicationDbContext(DbContextOptions <ApplicationDbContext> options,
                             IDomainEventService domainEventService)
     : base(options)
 {
     _domainEventService = domainEventService;
 }
示例#15
0
 /// <summary>
 /// Create entity lifetime service.
 /// </summary>
 /// <param name="domainEventService">Service notifying subscribers about domain events.</param>
 public EntityLifetimeService(IDomainEventService domainEventService)
 {
     this.domainEventService = domainEventService;
 }
示例#16
0
 public RemoveUserFromProjectCommandHandler(IApplicationDbContext context, IDomainEventService domainEventService)
 {
     _context            = context;
     _domainEventService = domainEventService;
 }
示例#17
0
 public XpAddedToUserEventHandler(IApplicationDbContext context, IDomainEventService provider, IXpCalculatorService calculator)
 {
     _context    = context;
     _provider   = provider;
     _calculator = calculator;
 }
示例#18
0
 public RegisterUserCommandHandler(IDomainEventService domainEventService, IIdentityService identityService)
 {
     _identityService    = identityService;
     _domainEventService = domainEventService;
 }
示例#19
0
 public ApplicationDbContext(DbContextOptions <ApplicationDbContext> options, IDateTimeService dateTime, IAuthenticatedUserService authenticatedUser, IDomainEventService domainEventService) : base(options)
 {
     ChangeTracker.QueryTrackingBehavior = QueryTrackingBehavior.NoTracking;
     _dateTime           = dateTime;
     _authenticatedUser  = authenticatedUser;
     _domainEventService = domainEventService;
 }
 public DatabaseContext(
     DbContextOptions <DatabaseContext> options, ICurrentUserService currentUserService, IDomainEventService domainEventService)
     : base(options)
 {
     _CurrentUserService = currentUserService;
     _DomainEventService = domainEventService;
 }
示例#21
0
 public SomeBusinessService(IDomainCommandService commandService, IDomainEventService eventService)
 {
     this.commandService = commandService;
     this.eventService   = eventService;
 }
 public PublishStockItemInStockChangedOnOutOfStock(IDomainEventService domainEventService)
 {
     this.domainEventService = domainEventService;
 }
 public PublicDispactchMessageOnOrderDispatch(IDomainEventService domainEventService)
 {
     this.domainEventService = domainEventService;
 }
示例#24
0
 public ChangeEmailCommandHandler(IIdentityService identityService, ICurrentUserService currentUserService, IDomainEventService domainEventService)
 {
     _identityService    = identityService;
     _domainEventService = domainEventService;
     _currentUserService = currentUserService;
 }
示例#25
0
 public MovieContext(DbContextOptions <MovieContext> options, IDomainEventService domainEventService) : base(options)
 {
     _domainEventService = domainEventService;
 }
 public GetPostByIdQueryHandler(IDataContext context, IMapper mapper, IDomainEventService domainEventService)
 {
     _context            = context;
     _mapper             = mapper;
     _domainEventService = domainEventService;
 }
 public DeleteMovieCommandHandler(IAsyncRepository <Movie> asyncRepository, IDomainEventService domainEventService)
 {
     _asyncRepository    = asyncRepository;
     _domainEventService = domainEventService;
 }
示例#28
0
 public ContentRepository(IDomainEventService domainEventService)
 {
     _domainEventService = domainEventService;
 }