WarningsConfigurationBuilder WarningsConfigurationBuilder Class

Configures the runtime behavior of warnings generated by Entity Framework. You can set a default behavior and behaviors for each warning type.

This class is used within the ConfigureWarnings(Action<WarningsConfigurationBuilder>) API and it is not designed to be directly constructed in your application code.

Syntax

Declaration

public class WarningsConfigurationBuilderPublic Class WarningsConfigurationBuilder

Inheritance Hierarchy

  • System.Object
    System.Object
  • WarningsConfigurationBuilder
    WarningsConfigurationBuilder

Inherited Members

ToString(),
ToString(),
Equals(Object),
Equals(Object),
Equals(Object, Object),
Equals(Object, Object),
ReferenceEquals(Object, Object),
ReferenceEquals(Object, Object),
GetHashCode(),
GetHashCode(),
GetType(),
GetType(),
MemberwiseClone()
MemberwiseClone()

Constructors summary

Initializes a new instance of the WarningsConfigurationBuilder class.

This class is used within the ConfigureWarnings(Action<WarningsConfigurationBuilder>) API and it is not designed to be directly constructed in your application code.

Properties summary

Gets the internal object used to store configuration.

Methods summary

Sets the default behavior when a warning is generated.

Causes nothing to happen when the specified core warnings are generated. Database providers (and other extensions) may provide extension method overloads of this method to configure this behavior for warnings they generate.

Causes a warning to be logged when the specified core warnings are generated. Database providers (and other extensions) may provide extension method overloads of this method to configure this behavior for warnings they generate.

Causes an exception to be thrown when the specified core warnings are generated. Database providers (and other extensions) may provide extension method overloads of this method to configure this behavior for warnings they generate.

Constructors

Properties

  • Configuration
    Configuration

    Gets the internal object used to store configuration.

    public virtual WarningsConfiguration Configuration { get; }Public Overridable ReadOnly Property Configuration As WarningsConfiguration

    Property Value

Methods

  • Default(WarningBehavior)
    Default(WarningBehavior)

    Sets the default behavior when a warning is generated.

    public virtual WarningsConfigurationBuilder Default(WarningBehavior warningBehavior)Public Overridable Function Default(warningBehavior As WarningBehavior) As WarningsConfigurationBuilder

    Parameters

    Returns

  • Ignore(CoreEventId[])
    Ignore(CoreEventId())

    Causes nothing to happen when the specified core warnings are generated. Database providers (and other extensions) may provide extension method overloads of this method to configure this behavior for warnings they generate.

    public virtual WarningsConfigurationBuilder Ignore(params CoreEventId[] coreEventIds)Public Overridable Function Ignore(ParamArray coreEventIds As CoreEventId()) As WarningsConfigurationBuilder

    Parameters

    Returns

  • Log(CoreEventId[])
    Log(CoreEventId())

    Causes a warning to be logged when the specified core warnings are generated. Database providers (and other extensions) may provide extension method overloads of this method to configure this behavior for warnings they generate.

    public virtual WarningsConfigurationBuilder Log(params CoreEventId[] coreEventIds)Public Overridable Function Log(ParamArray coreEventIds As CoreEventId()) As WarningsConfigurationBuilder

    Parameters

    Returns

  • Throw(CoreEventId[])
    Throw(CoreEventId())

    Causes an exception to be thrown when the specified core warnings are generated. Database providers (and other extensions) may provide extension method overloads of this method to configure this behavior for warnings they generate.

    public virtual WarningsConfigurationBuilder Throw(params CoreEventId[] coreEventIds)Public Overridable Function Throw(ParamArray coreEventIds As CoreEventId()) As WarningsConfigurationBuilder

    Parameters

    Returns

Details

Assembly

Microsoft.EntityFrameworkCore.dll