SqlServerCachingServicesExtensions.AddDistributedSqlServerCache 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
将 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>
用于配置所提供的 SqlServerCacheOptions 的 Action<T>。
返回
IServiceCollection,以便可以链接其他调用。