Delen via


DbContextOptionsBuilder.IsConfigured Property

Definition

Gets a value indicating whether any options have been configured.

public virtual bool IsConfigured { get; }
member this.IsConfigured : bool
Public Overridable ReadOnly Property IsConfigured As Boolean

Property Value

Remarks

This can be useful when you have overridden OnConfiguring(DbContextOptionsBuilder) to configure the context, but in some cases you also externally provide options via the context constructor. This property can be used to determine if the options have already been set, and skip some or all of the logic in OnConfiguring(DbContextOptionsBuilder).

Applies to