Class ChaparInboxExtensions
Extension methods for configuring the Chapar Inbox on Entity Framework Core.
Inherited Members
Namespace: Chapar.Inbox.EntityFrameworkCore.Extensions
Assembly: Chapar.Inbox.EntityFrameworkCore.dll
Syntax
public static class ChaparInboxExtensions
Methods
| Edit this page View SourceAddChaparInboxEntityFramework(IServiceCollection, Action<ChaparInboxOptions>?, Action<CleanupOptions>?)
Registers the EF Core‑based inbox services and optional delivery behavior, and cleanup job.
Declaration
public static IServiceCollection AddChaparInboxEntityFramework(this IServiceCollection services, Action<ChaparInboxOptions>? configure = null, Action<CleanupOptions>? configureCleanup = null)
Parameters
| Type | Name | Description |
|---|---|---|
| IServiceCollection | services | The IServiceCollection to add the services to. |
| Action<ChaparInboxOptions> | configure | An optional action to customize ChaparInboxOptions, such as enabling at‑most‑once delivery through MarkProcessedAfterFirstAttempt. |
| Action<CleanupOptions> | configureCleanup | Optional action to customize CleanupOptions for the inbox table. |
Returns
| Type | Description |
|---|---|
| IServiceCollection | The same service collection so that multiple calls can be chained. |
AddInboxCleanup<TStore>(IServiceCollection, Action<CleanupOptions>?)
Registers a custom cleanup job for the inbox using the specified store.
Declaration
public static IServiceCollection AddInboxCleanup<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. |
ConfigureChaparInbox(ModelBuilder, string, string)
Configures the inbox table via ModelBuilder.
Declaration
public static ModelBuilder ConfigureChaparInbox(this ModelBuilder builder, string tableName = "InboxMessages", string schema = "chapar")
Parameters
| Type | Name | Description |
|---|---|---|
| ModelBuilder | builder | The ModelBuilder to configure. |
| string | tableName | The name of the inbox table. Default is "InboxMessages". |
| string | schema | The schema of the inbox table. Default is "chapar". |
Returns
| Type | Description |
|---|---|
| ModelBuilder | The ModelBuilder for chaining. |