protected override IEventFlowOptions Options(IEventFlowOptions eventFlowOptions)
        {
            var builder = new ContainerBuilder();

            builder.RegisterType <DbContext>().As <IDbContext>().InstancePerLifetimeScope();

            return(base.Options(eventFlowOptions
                                .UseAutofacContainerBuilder(builder))
                   .AddQueryHandler <DbContextQueryHandler, DbContextQuery, string>());
        }
Exemplo n.º 2
0
 internal static void ConfigureEventFlow(this IEventFlowOptions eventFlowOptions,
                                         IConfiguration configuration,
                                         ContainerBuilder containerBuilder)
 {
     eventFlowOptions
     .UseAutofacContainerBuilder(containerBuilder)
     .AddAspNetCore(c => c
                    .RunBootstrapperOnHostStartup()
                    .UseMvcJsonOptions()
                    .UseModelBinding()
                    .AddUserClaimsMetadata()
                    .UseLogging()
                    .AddMetadataProviders()
                    .UseModelBinding()
                    .AddUriMetadata()
                    .AddRequestHeadersMetadata())
     .RegisterModules()
     .UseFilesEventStore(FilesEventStoreConfiguration.Create("./evt-store"))
     .UseConsoleLog();
 }
Exemplo n.º 3
0
 protected override IEventFlowOptions Options(IEventFlowOptions eventFlowOptions)
 {
     return(base.Options(eventFlowOptions
                         .UseAutofacContainerBuilder(new ContainerBuilder())));
 }
 public static IEventFlowOptions UseAutofacContainerBuilder(
     this IEventFlowOptions eventFlowOptions)
 {
     return(eventFlowOptions
            .UseAutofacContainerBuilder(new ContainerBuilder()));
 }