RelationalDatabaseFacadeExtensions.Migrate(DatabaseFacade) 메서드

정의

컨텍스트에 대해 보류 중인 모든 마이그레이션을 데이터베이스에 적용합니다. 데이터베이스가 아직 없는 경우 데이터베이스를 만듭니다.

public static void Migrate (this Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade databaseFacade);
[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Migrations operations are not supported with NativeAOT Use a migration bundle or an alternate way of executing migration operations.")]
public static void Migrate (this Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade databaseFacade);
static member Migrate : Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade -> unit
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Migrations operations are not supported with NativeAOT Use a migration bundle or an alternate way of executing migration operations.")>]
static member Migrate : Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade -> unit
<Extension()>
Public Sub Migrate (databaseFacade As DatabaseFacade)

매개 변수

databaseFacade
DatabaseFacade

DatabaseFacade 컨텍스트에 대한 입니다.

특성

설명

이 API는 와 EnsureCreated()함께 사용할 수 없습니다. EnsureCreated는 마이그레이션을 사용하여 데이터베이스를 만들지 않으므로 생성된 데이터베이스는 나중에 마이그레이션을 사용하여 업데이트할 수 없습니다.

자세한 내용 및 예제는 데이터베이스 마이그레이션 을 참조하세요.

적용 대상