SqlServerCachingServicesExtensions.AddDistributedSqlServerCache 方法

定义

将 Microsoft SQL Server 分布式缓存服务添加到指定的 IServiceCollection 中。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddDistributedSqlServerCache(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, Action<Microsoft::Extensions::Caching::SqlServer::SqlServerCacheOptions ^> ^ setupAction);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddDistributedSqlServerCache (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<Microsoft.Extensions.Caching.SqlServer.SqlServerCacheOptions> setupAction);
static member AddDistributedSqlServerCache : Microsoft.Extensions.DependencyInjection.IServiceCollection * Action<Microsoft.Extensions.Caching.SqlServer.SqlServerCacheOptions> -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddDistributedSqlServerCache (services As IServiceCollection, setupAction As Action(Of SqlServerCacheOptions)) As IServiceCollection

参数

services
IServiceCollection

要向其中添加服务的 IServiceCollection

setupAction
Action<SqlServerCacheOptions>

用于配置所提供的 SqlServerCacheOptionsAction<T>

返回

IServiceCollection,以便可以链接其他调用。

适用于