Share via


IDistributedApplicationBuilderExtensions.AddDaprStateStore Method

Definition

Adds a Dapr state store component to the application model. Aspire will configure an appropriate type when running or deploying.

public static Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Dapr.IDaprComponentResource> AddDaprStateStore (this Aspire.Hosting.IDistributedApplicationBuilder builder, string name, Aspire.Hosting.Dapr.DaprComponentOptions? options = default);
static member AddDaprStateStore : Aspire.Hosting.IDistributedApplicationBuilder * string * Aspire.Hosting.Dapr.DaprComponentOptions -> Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Dapr.IDaprComponentResource>
<Extension()>
Public Function AddDaprStateStore (builder As IDistributedApplicationBuilder, name As String, Optional options As DaprComponentOptions = Nothing) As IResourceBuilder(Of IDaprComponentResource)

Parameters

builder
IDistributedApplicationBuilder

The distributed application builder instance.

name
String

The name of the component.

options
DaprComponentOptions

Options for configuring the component, if any.

Returns

A reference to the IResourceBuilder<T>.

Applies to