Share via


DesignTimeServiceCollectionExtensions.AddDbContextDesignTimeServices Method

Definition

Adds services from the DbContext which are used at design time.

public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddDbContextDesignTimeServices (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Microsoft.EntityFrameworkCore.DbContext context);
static member AddDbContextDesignTimeServices : Microsoft.Extensions.DependencyInjection.IServiceCollection * Microsoft.EntityFrameworkCore.DbContext -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddDbContextDesignTimeServices (services As IServiceCollection, context As DbContext) As IServiceCollection

Parameters

services
IServiceCollection

The IServiceCollection the services will be added to.

context
DbContext

The DbContext the services will be added from.

Returns

The services. This enables chaining additional method calls.

Remarks

See EF Core design-time services for more information and examples.

Applies to