Share via


EF.IsDesignTime Property

Definition

This flag is set to true when code is being run from a design-time tool, such as "dotnet ef" or one of the Package Manager Console PowerShell commands "Add-Migration", "Update-Database", etc.

public static bool IsDesignTime { get; set; }
static member IsDesignTime : bool with get, set
Public Shared Property IsDesignTime As Boolean

Property Value

Remarks

This flag can be inspected to change application behavior. For example, if the application is being executed by an EF design-time tool, then it may choose to skip executing migrations commands as part of startup.

See EF Core command-line reference for more information and examples.

Applies to