WarningsConfigurationBuilder Class

Definition

Configures the runtime behavior of events generated by Entity Framework. You can set a default behavior and behaviors for each event ID.

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

C#
public class WarningsConfigurationBuilder
Inheritance
WarningsConfigurationBuilder

Remarks

See Configuration for specific messages for more information and examples.

Constructors

Methods

Default(WarningBehavior)

Sets the default behavior when a warning is generated.

Ignore(EventId[])

Causes nothing to happen when the specified event occurs, regardless of default configuration.

Log(EventId[])

Causes an event to be logged, regardless of default configuration.

Log(ValueTuple<EventId,LogLevel>[])

Causes an event to be logged at the specified level, regardless of default configuration.

Throw(EventId[])

Causes an exception to be thrown when the specified event occurs, regardless of default configuration.

Applies to

Toode Versioonid
Entity Framework Core 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0