# HostingExtensions Methods

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.reminders.cosmos/orleans.hosting.hostingextensions/)

## UseCosmosReminderService(IServiceCollection, Action&lt;CosmosReminderTableOptions&gt;) {#usecosmosreminderservice-this-microsoft-extensions-dependencyinjection-iservicec-da767057}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.reminders.cosmos/orleans.hosting.hostingextensions/methods/usecosmosreminderservice-this-microsoft-extensions-dependencyinjection-iservicec-da767057/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Azure/Orleans.Reminders.Cosmos/HostingExtensions.cs)

```csharp
public static IServiceCollection UseCosmosReminderService(this IServiceCollection services, Action<CosmosReminderTableOptions> configure)
```

Adds reminder storage backed by Azure Cosmos DB.

### Parameters

- `services` (`IServiceCollection`): The service collection.
- `configure` (`Action<CosmosReminderTableOptions>`): The delegate used to configure the reminder store.

### Returns

The provided `Microsoft.Extensions.DependencyInjection.IServiceCollection`, for chaining.

## UseCosmosReminderService(IServiceCollection, Action&lt;OptionsBuilder&lt;CosmosReminderTableOptions&gt;&gt;) {#usecosmosreminderservice-this-microsoft-extensions-dependencyinjection-iservicec-77096fac}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.reminders.cosmos/orleans.hosting.hostingextensions/methods/usecosmosreminderservice-this-microsoft-extensions-dependencyinjection-iservicec-77096fac/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Azure/Orleans.Reminders.Cosmos/HostingExtensions.cs)

```csharp
public static IServiceCollection UseCosmosReminderService(this IServiceCollection services, Action<OptionsBuilder<CosmosReminderTableOptions>> configure)
```

Adds reminder storage backed by Azure Cosmos DB.

### Parameters

- `services` (`IServiceCollection`): The service collection.
- `configure` (`Action<OptionsBuilder<CosmosReminderTableOptions>>`): The delegate used to configure the reminder store.

### Returns

The provided `Microsoft.Extensions.DependencyInjection.IServiceCollection`, for chaining.

## UseCosmosReminderService(ISiloBuilder, Action&lt;CosmosReminderTableOptions&gt;) {#usecosmosreminderservice-this-orleans-hosting-isilobuilder-system-action-orleans-c21724fc}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.reminders.cosmos/orleans.hosting.hostingextensions/methods/usecosmosreminderservice-this-orleans-hosting-isilobuilder-system-action-orleans-c21724fc/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Azure/Orleans.Reminders.Cosmos/HostingExtensions.cs)

```csharp
public static ISiloBuilder UseCosmosReminderService(this ISiloBuilder builder, Action<CosmosReminderTableOptions> configure)
```

Adds reminder storage backed by Azure Cosmos DB.

### Parameters

- `builder` (`ISiloBuilder`): The builder.
- `configure` (`Action<CosmosReminderTableOptions>`): The delegate used to configure the reminder store.

### Returns

The provided [ISiloBuilder](/orleans/docs/api/csharp/microsoft.orleans.runtime/orleans.hosting.isilobuilder/), for chaining.

## UseCosmosReminderService(ISiloBuilder, Action&lt;OptionsBuilder&lt;CosmosReminderTableOptions&gt;&gt;) {#usecosmosreminderservice-this-orleans-hosting-isilobuilder-system-action-microso-65d5713b}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.reminders.cosmos/orleans.hosting.hostingextensions/methods/usecosmosreminderservice-this-orleans-hosting-isilobuilder-system-action-microso-65d5713b/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Azure/Orleans.Reminders.Cosmos/HostingExtensions.cs)

```csharp
public static ISiloBuilder UseCosmosReminderService(this ISiloBuilder builder, Action<OptionsBuilder<CosmosReminderTableOptions>> configure)
```

Adds reminder storage backed by Azure Cosmos DB.

### Parameters

- `builder` (`ISiloBuilder`): The builder.
- `configure` (`Action<OptionsBuilder<CosmosReminderTableOptions>>`): The delegate used to configure the reminder store.

### Returns

The provided [ISiloBuilder](/orleans/docs/api/csharp/microsoft.orleans.runtime/orleans.hosting.isilobuilder/), for chaining.
