DesignTimeServiceCollectionExtensions.AddEntityFrameworkDesignTimeServices 方法

定义

添加 Entity Framework Core 设计时服务。

public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddEntityFrameworkDesignTimeServices (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Microsoft.EntityFrameworkCore.Design.Internal.IOperationReporter reporter = default, Func<IServiceProvider> applicationServiceProviderAccessor = default);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddEntityFrameworkDesignTimeServices (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Microsoft.EntityFrameworkCore.Design.Internal.IOperationReporter? reporter = default, Func<IServiceProvider>? applicationServiceProviderAccessor = default);
static member AddEntityFrameworkDesignTimeServices : Microsoft.Extensions.DependencyInjection.IServiceCollection * Microsoft.EntityFrameworkCore.Design.Internal.IOperationReporter * Func<IServiceProvider> -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddEntityFrameworkDesignTimeServices (services As IServiceCollection, Optional reporter As IOperationReporter = Nothing, Optional applicationServiceProviderAccessor As Func(Of IServiceProvider) = Nothing) As IServiceCollection

参数

services
IServiceCollection

服务 IServiceCollection 将添加到 。

reporter
Microsoft.EntityFrameworkCore.Design.Internal.IOperationReporter

用于报告设计时消息。

applicationServiceProviderAccessor
Func<IServiceProvider>

应用程序服务提供程序的访问器。

返回

services。 这样就可以链接其他方法调用。

注解

有关详细信息和示例,请参阅 EF Core 设计时服务

适用于