Udostępnij za pośrednictwem


NonNullableReferencePropertyConvention Class

Definition

A convention that configures the properties of non-nullable types as required.

public class NonNullableReferencePropertyConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.NonNullableConventionBase, Microsoft.EntityFrameworkCore.Metadata.Conventions.IPropertyAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IPropertyFieldChangedConvention
public class NonNullableReferencePropertyConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.NonNullableConventionBase, Microsoft.EntityFrameworkCore.Metadata.Conventions.IComplexPropertyAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IComplexPropertyFieldChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IPropertyAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IPropertyFieldChangedConvention
public class NonNullableReferencePropertyConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.NonNullableConventionBase, Microsoft.EntityFrameworkCore.Metadata.Conventions.IComplexPropertyAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IComplexPropertyFieldChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IPropertyAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IPropertyElementTypeChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IPropertyFieldChangedConvention
type NonNullableReferencePropertyConvention = class
    inherit NonNullableConventionBase
    interface IPropertyAddedConvention
    interface IConvention
    interface IPropertyFieldChangedConvention
type NonNullableReferencePropertyConvention = class
    inherit NonNullableConventionBase
    interface IPropertyAddedConvention
    interface IConvention
    interface IPropertyFieldChangedConvention
    interface IComplexPropertyAddedConvention
    interface IComplexPropertyFieldChangedConvention
type NonNullableReferencePropertyConvention = class
    inherit NonNullableConventionBase
    interface IPropertyAddedConvention
    interface IConvention
    interface IPropertyFieldChangedConvention
    interface IPropertyElementTypeChangedConvention
    interface IComplexPropertyAddedConvention
    interface IComplexPropertyFieldChangedConvention
Public Class NonNullableReferencePropertyConvention
Inherits NonNullableConventionBase
Implements IPropertyAddedConvention, IPropertyFieldChangedConvention
Public Class NonNullableReferencePropertyConvention
Inherits NonNullableConventionBase
Implements IComplexPropertyAddedConvention, IComplexPropertyFieldChangedConvention, IPropertyAddedConvention, IPropertyFieldChangedConvention
Public Class NonNullableReferencePropertyConvention
Inherits NonNullableConventionBase
Implements IComplexPropertyAddedConvention, IComplexPropertyFieldChangedConvention, IPropertyAddedConvention, IPropertyElementTypeChangedConvention, IPropertyFieldChangedConvention
Inheritance
NonNullableReferencePropertyConvention
Implements

Remarks

See Model building conventions for more information and examples.

Constructors

NonNullableReferencePropertyConvention(ProviderConventionSetBuilderDependencies)

Creates a new instance of NonNullableReferencePropertyConvention.

Properties

Dependencies

Dependencies for this service.

(Inherited from NonNullableConventionBase)

Methods

IsNonNullableReferenceType(IConventionModelBuilder, MemberInfo)

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

(Inherited from NonNullableConventionBase)
ProcessComplexPropertyAdded(IConventionComplexPropertyBuilder, IConventionContext<IConventionComplexPropertyBuilder>)

Called after a complex property is added to a type-like object.

ProcessComplexPropertyFieldChanged(IConventionComplexPropertyBuilder, FieldInfo, FieldInfo, IConventionContext<FieldInfo>)

Called after the backing field for a complex property is changed.

ProcessModelFinalized(IConventionModelBuilder, IConventionContext<IConventionModelBuilder>)

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

(Inherited from NonNullableConventionBase)
ProcessModelFinalizing(IConventionModelBuilder, IConventionContext<IConventionModelBuilder>)

Called when a model is being finalized.

(Inherited from NonNullableConventionBase)
ProcessPropertyAdded(IConventionPropertyBuilder, IConventionContext<IConventionPropertyBuilder>)

Called after a property is added to the entity type.

ProcessPropertyElementTypeChanged(IConventionPropertyBuilder, IElementType, IElementType, IConventionContext<IElementType>)

Called after the element type for a property is changed.

ProcessPropertyFieldChanged(IConventionPropertyBuilder, FieldInfo, FieldInfo, IConventionContext<FieldInfo>)

Called after the backing field for a property is changed.

TryGetNullabilityInfo(IConventionModelBuilder, MemberInfo, NullabilityInfo)

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

(Inherited from NonNullableConventionBase)

Applies to