public static IMessageOutboxBuilder AddInMemory(this IMessageOutboxBuilder configurator, string mongoSectionName = null) { configurator.Builder.Services.AddTransient <IMessageOutbox, InMemoryMessageOutbox>(); return(configurator); }
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); }