WarningsConfigurationBuilder Class

Definition

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.

public class WarningsConfigurationBuilder
type WarningsConfigurationBuilder = class
Public Class WarningsConfigurationBuilder
Inheritance
WarningsConfigurationBuilder

Constructors

WarningsConfigurationBuilder(WarningsConfiguration)

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

Configuration

Gets the internal object used to store configuration.

Methods

Default(WarningBehavior)

Sets the default behavior when a warning is generated.

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.

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.

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.

Extension Methods

Ignore(WarningsConfigurationBuilder, InMemoryEventId[])

Causes nothing to happen when the specified in-memory warnings are generated.

Ignore(WarningsConfigurationBuilder, RelationalEventId[])

Causes nothing to happen when the specified relational database warnings are generated.

Log(WarningsConfigurationBuilder, InMemoryEventId[])

Causes a warning to be logged when the specified in-memory warnings are generated.

Log(WarningsConfigurationBuilder, RelationalEventId[])

Causes a warning to be logged when the specified relational database warnings are generated.

Throw(WarningsConfigurationBuilder, InMemoryEventId[])

Causes an exception to be thrown when the specified in-memory warnings are generated.

Throw(WarningsConfigurationBuilder, RelationalEventId[])

Causes an exception to be thrown when the specified relational database warnings are generated.

Applies to