WarningsConfigurationBuilder Class
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.
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.
public class WarningsConfigurationBuilder
type WarningsConfigurationBuilder = class
Public Class WarningsConfigurationBuilder
- Inheritance
-
WarningsConfigurationBuilder
Remarks
See Configuration for specific messages for more information and examples.
Constructors
WarningsConfigurationBuilder(DbContextOptionsBuilder) |
Initializes a new instance of the WarningsConfigurationBuilder class. |
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
Entity Framework