Example #1
0
        public static IMessageOutboxBuilder AddInMemory(this IMessageOutboxBuilder configurator,
                                                        string mongoSectionName = null)
        {
            configurator.Builder.Services.AddTransient <IMessageOutbox, InMemoryMessageOutbox>();

            return(configurator);
        }
Example #2
0
        public static IMessageOutboxBuilder UseDbContext <TDbContext>(this IMessageOutboxBuilder builder)
            where TDbContext : DbContext
        {
            builder.Builder.Services.AddDbContext <TDbContext>();
            builder.Builder.Services.AddTransient <IMessageOutbox, EntityFrameworkMessageOutbox <TDbContext> >();
            builder.Builder.Services.AddTransient <IMessageOutboxRepository, EntityFrameworkMessageOutbox <TDbContext> >();

            return(builder);
        }