SessionServiceCollectionExtensions.AddSession SessionServiceCollectionExtensions.AddSession SessionServiceCollectionExtensions.AddSession Method

Definition

Overloads

AddSession(IServiceCollection) AddSession(IServiceCollection) AddSession(IServiceCollection)

Adds services required for application session state.

AddSession(IServiceCollection, Action<SessionOptions>) AddSession(IServiceCollection, Action<SessionOptions>) AddSession(IServiceCollection, Action<SessionOptions>)

Adds services required for application session state.

AddSession(IServiceCollection) AddSession(IServiceCollection) AddSession(IServiceCollection)

Adds services required for application session state.

public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddSession (this Microsoft.Extensions.DependencyInjection.IServiceCollection services);
static member AddSession : Microsoft.Extensions.DependencyInjection.IServiceCollection -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddSession (services As IServiceCollection) As IServiceCollection

Parameters

Returns

The IServiceCollection so that additional calls can be chained.

AddSession(IServiceCollection, Action<SessionOptions>) AddSession(IServiceCollection, Action<SessionOptions>) AddSession(IServiceCollection, Action<SessionOptions>)

Adds services required for application session state.

public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddSession (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<Microsoft.AspNetCore.Builder.SessionOptions> configure);
static member AddSession : Microsoft.Extensions.DependencyInjection.IServiceCollection * Action<Microsoft.AspNetCore.Builder.SessionOptions> -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddSession (services As IServiceCollection, configure As Action(Of SessionOptions)) As IServiceCollection

Parameters

configure
Action<SessionOptions>

The session options to configure the middleware with.

Returns

The IServiceCollection so that additional calls can be chained.

Applies to