Table of Contents

Class NonNullableReferencePropertyConvention

Namespace
Microsoft.EntityFrameworkCore.Metadata.Conventions
Assembly
Microsoft.EntityFrameworkCore.dll

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

public class NonNullableReferencePropertyConvention : NonNullableConventionBase, IModelFinalizingConvention, IPropertyAddedConvention, IPropertyFieldChangedConvention, IComplexPropertyAddedConvention, IComplexPropertyFieldChangedConvention, IConvention
Inheritance
NonNullableReferencePropertyConvention
Implements
Inherited Members

Remarks

See Model building conventions for more information and examples.

Constructors

NonNullableReferencePropertyConvention(ProviderConventionSetBuilderDependencies)

Creates a new instance of NonNullableReferencePropertyConvention.

public NonNullableReferencePropertyConvention(ProviderConventionSetBuilderDependencies dependencies)

Parameters

dependencies ProviderConventionSetBuilderDependencies

Parameter object containing dependencies for this convention.

Methods

ProcessComplexPropertyAdded(IConventionComplexPropertyBuilder, IConventionContext<IConventionComplexPropertyBuilder>)

public void ProcessComplexPropertyAdded(IConventionComplexPropertyBuilder propertyBuilder, IConventionContext<IConventionComplexPropertyBuilder> context)

Parameters

propertyBuilder IConventionComplexPropertyBuilder
context IConventionContext<IConventionComplexPropertyBuilder>

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

public void ProcessComplexPropertyFieldChanged(IConventionComplexPropertyBuilder propertyBuilder, FieldInfo? newFieldInfo, FieldInfo? oldFieldInfo, IConventionContext<FieldInfo> context)

Parameters

propertyBuilder IConventionComplexPropertyBuilder
newFieldInfo FieldInfo
oldFieldInfo FieldInfo
context IConventionContext<FieldInfo>

ProcessPropertyAdded(IConventionPropertyBuilder, IConventionContext<IConventionPropertyBuilder>)

public virtual void ProcessPropertyAdded(IConventionPropertyBuilder propertyBuilder, IConventionContext<IConventionPropertyBuilder> context)

Parameters

propertyBuilder IConventionPropertyBuilder
context IConventionContext<IConventionPropertyBuilder>

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

public virtual void ProcessPropertyFieldChanged(IConventionPropertyBuilder propertyBuilder, FieldInfo? newFieldInfo, FieldInfo? oldFieldInfo, IConventionContext<FieldInfo> context)

Parameters

propertyBuilder IConventionPropertyBuilder
newFieldInfo FieldInfo
oldFieldInfo FieldInfo
context IConventionContext<FieldInfo>