Class EntityFrameworkDatabaseMigrationHostedService
Namespace: Cephalon.Data.EntityFramework.Services
Assembly: Cephalon.Data.EntityFramework.dll
Applies startup schema changes for Entity Framework Core database-role targets selected through Engine:Databases.
public sealed class EntityFrameworkDatabaseMigrationHostedService : IHostedServiceInheritance
Section titled “Inheritance”object ← EntityFrameworkDatabaseMigrationHostedService
Implements
Section titled “Implements”Inherited Members
Section titled “Inherited Members”object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()
Constructors
Section titled “Constructors”EntityFrameworkDatabaseMigrationHostedService(IServiceProvider, AppProfile, IEnumerable<EntityFrameworkDatabaseMigrationRegistration>)
Section titled “ EntityFrameworkDatabaseMigrationHostedService(IServiceProvider, AppProfile, IEnumerable<EntityFrameworkDatabaseMigrationRegistration>)”Applies startup schema changes for Entity Framework Core database-role targets selected through Engine:Databases.
public EntityFrameworkDatabaseMigrationHostedService(IServiceProvider serviceProvider, AppProfile appProfile, IEnumerable<EntityFrameworkDatabaseMigrationRegistration> registrations)Parameters
Section titled “Parameters”serviceProvider IServiceProvider
appProfile AppProfile
registrations IEnumerable<EntityFrameworkDatabaseMigrationRegistration>
Methods
Section titled “Methods”StartAsync(CancellationToken)
Section titled “ StartAsync(CancellationToken)”Applies the configured startup migration policy for every targeted Entity Framework database role.
public Task StartAsync(CancellationToken cancellationToken)Parameters
Section titled “Parameters”cancellationToken CancellationToken
The token that cancels startup migration execution.
Returns
Section titled “Returns”StopAsync(CancellationToken)
Section titled “ StopAsync(CancellationToken)”Stops the hosted service. Entity Framework startup migration execution is synchronous during startup, so there is no background work to drain.
public Task StopAsync(CancellationToken cancellationToken)Parameters
Section titled “Parameters”cancellationToken CancellationToken
The token that cancels shutdown.
Returns
Section titled “Returns”A completed task.