NonNullableConventionBase Class

Definition

A base type for conventions that configure model aspects based on whether the member type is a non-nullable reference type.

C#
public abstract class NonNullableConventionBase : Microsoft.EntityFrameworkCore.Metadata.Conventions.IModelFinalizedConvention
C#
public abstract class NonNullableConventionBase : Microsoft.EntityFrameworkCore.Metadata.Conventions.IModelFinalizingConvention
Inheritance
NonNullableConventionBase
Derived
Implements

Remarks

See Model building conventions for more information and examples.

Constructors

Properties

Dependencies

Dependencies for this service.

Methods

IsNonNullableReferenceType(IConventionModelBuilder, MemberInfo)

Returns a value indicating whether the member type is a non-nullable reference type.

ProcessModelFinalized(IConventionModelBuilder, IConventionContext<IConventionModelBuilder>)

Called after a model is finalized. Removes the cached state annotation used by this convention.

ProcessModelFinalizing(IConventionModelBuilder, IConventionContext<IConventionModelBuilder>)

Called when a model is being finalized.

TryGetNullabilityInfo(IConventionModelBuilder, MemberInfo, NullabilityInfo)

Returns a value indicating whether the member type is a non-nullable reference type.

Applies to

Proizvod Verzije
Entity Framework Core 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0