protected override IRootResolver CreateRootResolver(IEventFlowOptions eventFlowOptions)
 {
     return(eventFlowOptions
            .ConfigureEntityFramework(EntityFrameworkConfiguration.New)
            .AddDbContextProvider <TestDbContext, InMemoryDbContextProvider>(Lifetime.Singleton)
            .ConfigureForReadStoreTest()
            .CreateResolver());
 }
 public void Register(IEventFlowOptions eventFlowOptions)
 {
     eventFlowOptions.ConfigureEntityFramework(EntityFrameworkConfiguration.New)
     .AddDefaults(typeof(EntityFrameworkReadModelModule).Assembly)
     .AddDbContextProvider <RestAirlineReadModelContext, RestAirlineReadModelDbContextProvider>()
     .UseEntityFrameworkReadModel <BookingReadModel, RestAirlineReadModelContext>()
     ;
 }
 public void Register(IEventFlowOptions eventFlowOptions)
 {
     eventFlowOptions
     .ConfigureEntityFramework(EntityFrameworkConfiguration.New)
     .AddDbContextProvider <EventStoreContext, EventStoreContextProvider>()
     .UseEntityFrameworkEventStore <EventStoreContext>()
     .UseEntityFrameworkSnapshotStore <EventStoreContext>();
 }
 public void Register(IEventFlowOptions options)
 {
     options
     .ConfigureEntityFramework(EntityFrameworkConfiguration.New)
     .AddDefaults(typeof(EventSourcingModule).Assembly)
     .AddDbContextProvider <EventSourcingDbContext, EventSourcingDbContextProvider>()
     .UseEntityFrameworkEventStore <EventSourcingDbContext>()
     .UseEntityFrameworkSnapshotStore <EventSourcingDbContext>();
 }
        public void Register(IEventFlowOptions options)
        {
            options.ConfigureEntityFramework(EntityFrameworkConfiguration.New)
            .AddDefaults(typeof(ReviewReadStoreModule).Assembly)
            .AddDbContextProvider <ReviewContext, ReviewContextProvider>()
            .UseEntityFrameworkEventStore <ReviewContext>()
            .UseEntityFrameworkReadModel <ReviewReadModel, ReviewContext>()

            .RegisterServices(s =>
            {
                s.Register <ISearchableReadModelStore <ReviewReadModel>, EfSearchableReadStore <ReviewReadModel, ReviewContext> >();
            });
        }
Esempio n. 6
0
 public void Register(IEventFlowOptions options)
 {
     options.ConfigureEntityFramework(EntityFrameworkConfiguration.New)
     .AddDefaults(typeof(TrackingReadStoreModule).Assembly)
     .AddDbContextProvider <TrackingContext, TrackingContextProvider>()
     .UseEntityFrameworkEventStore <TrackingContext>()
     .UseEntityFrameworkReadModel <LocationReadModel, TrackingContext>()
     .RegisterServices(s => {
         s.Register <ITrackingQueryService, TrackingQueryService>();
         s.Register <ITrackingCommandService, TrackingCommandService>();
         s.Register <ISearchableReadModelStore <LocationReadModel>, EfSearchableReadStore <LocationReadModel, TrackingContext> >();
     });
 }
Esempio n. 7
0
 public void Register(IEventFlowOptions eventFlowOptions)
 {
     eventFlowOptions.ConfigureEntityFramework(EntityFrameworkConfiguration.New)
     .AddDefaults(typeof(TicketReadStoreModule).Assembly)
     .AddDbContextProvider <TicketContext, TicketContextProvider>()
     .UseEntityFrameworkEventStore <TicketContext>()
     .UseEntityFrameworkReadModel <TicketReadModel, TicketContext>()
     .RegisterServices(x =>
     {
         x.Register <ITicketCommandService, TicketCommandService>();
         x.Register <ISearchableReadModelStore <TicketReadModel>, EfSearchableReadStore <TicketReadModel, TicketContext> >();
     });
 }
Esempio n. 8
0
        public void Register(IEventFlowOptions options)
        {
            options.ConfigureEntityFramework(EntityFrameworkConfiguration.New)
            .AddDefaults(typeof(VehicleReadStoreModule).Assembly)
            .AddDbContextProvider <VehicleContext, VehicleContextProvider>()
            .UseEntityFrameworkEventStore <VehicleContext>()
            //update read models
            .UseEntityFrameworkReadModel <VehicleReadModel, VehicleContext>()

            .RegisterServices(s => {
                s.Register <IVehicleQueryService, VehicleQueryService>();
                s.Register <ISearchableReadModelStore <VehicleReadModel>, EfSearchableReadStore <VehicleReadModel, VehicleContext> >();
            });
        }