Class ChaparOutboxExtensions
Extension methods for configuring the Chapar Outbox on Entity Framework Core.
Inherited Members
Namespace: Chapar.Outbox.EntityFrameworkCore.Extensions
Assembly: Chapar.Outbox.EntityFrameworkCore.dll
Syntax
public static class ChaparOutboxExtensions
Methods
| Edit this page View SourceAddChaparOutboxEntityFramework(IServiceCollection, Action<ChaparOutboxOptions>?, Action<CleanupOptions>?)
Registers the EF Core‑based outbox services, optional delivery behavior, and cleanup job.
Declaration
public static IServiceCollection AddChaparOutboxEntityFramework(this IServiceCollection services, Action<ChaparOutboxOptions>? configure = null, Action<CleanupOptions>? configureCleanup = null)
Parameters
| Type | Name | Description |
|---|---|---|
| IServiceCollection | services | The service collection. |
| Action<ChaparOutboxOptions> | configure | Optional action to customize ChaparOutboxOptions. |
| Action<CleanupOptions> | configureCleanup | Optional action to customize CleanupOptions for the outbox table. |
Returns
| Type | Description |
|---|---|
| IServiceCollection | The same service collection so that multiple calls can be chained. |
AddOutboxCleanup<TStore>(IServiceCollection, Action<CleanupOptions>?)
Registers a custom cleanup job for the outbox using the specified store.
Declaration
public static IServiceCollection AddOutboxCleanup<TStore>(this IServiceCollection services, Action<CleanupOptions>? configure = null) where TStore : class, ICleanupStore
Parameters
| Type | Name | Description |
|---|---|---|
| IServiceCollection | services | The service collection. |
| Action<CleanupOptions> | configure | Optional configuration for the cleanup job. |
Returns
| Type | Description |
|---|---|
| IServiceCollection |
Type Parameters
| Name | Description |
|---|---|
| TStore | The store type that implements ICleanupStore. |
ConfigureChaparOutbox(ModelBuilder, string, string)
Configures the outbox table via ModelBuilder.
Declaration
public static ModelBuilder ConfigureChaparOutbox(this ModelBuilder builder, string tableName = "OutboxMessages", string schema = "chapar")
Parameters
| Type | Name | Description |
|---|---|---|
| ModelBuilder | builder | The ModelBuilder to configure. |
| string | tableName | The name of the outbox table. Default is "OutboxMessages". |
| string | schema | The schema of the outbox table. Default is "chapar". |
Returns
| Type | Description |
|---|---|
| ModelBuilder | The ModelBuilder for chaining. |