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>()); }
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(); }
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())); }