EF.IsDesignTime Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Entity Framework