DesignTimeServiceCollectionExtensions.AddEntityFrameworkDesignTimeServices 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
添加 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 设计时服务 。