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
ProviderConventionSetBuilderDependenciesParameter object containing dependencies for this convention.
Methods
ProcessComplexPropertyAdded(IConventionComplexPropertyBuilder, IConventionContext<IConventionComplexPropertyBuilder>)
public void ProcessComplexPropertyAdded(IConventionComplexPropertyBuilder propertyBuilder, IConventionContext<IConventionComplexPropertyBuilder> context)
Parameters
propertyBuilder
IConventionComplexPropertyBuildercontext
IConventionContext<IConventionComplexPropertyBuilder>
ProcessComplexPropertyFieldChanged(IConventionComplexPropertyBuilder, FieldInfo?, FieldInfo?, IConventionContext<FieldInfo>)
public void ProcessComplexPropertyFieldChanged(IConventionComplexPropertyBuilder propertyBuilder, FieldInfo? newFieldInfo, FieldInfo? oldFieldInfo, IConventionContext<FieldInfo> context)
Parameters
propertyBuilder
IConventionComplexPropertyBuildernewFieldInfo
FieldInfooldFieldInfo
FieldInfocontext
IConventionContext<FieldInfo>
ProcessPropertyAdded(IConventionPropertyBuilder, IConventionContext<IConventionPropertyBuilder>)
public virtual void ProcessPropertyAdded(IConventionPropertyBuilder propertyBuilder, IConventionContext<IConventionPropertyBuilder> context)
Parameters
propertyBuilder
IConventionPropertyBuildercontext
IConventionContext<IConventionPropertyBuilder>
ProcessPropertyFieldChanged(IConventionPropertyBuilder, FieldInfo?, FieldInfo?, IConventionContext<FieldInfo>)
public virtual void ProcessPropertyFieldChanged(IConventionPropertyBuilder propertyBuilder, FieldInfo? newFieldInfo, FieldInfo? oldFieldInfo, IConventionContext<FieldInfo> context)
Parameters
propertyBuilder
IConventionPropertyBuildernewFieldInfo
FieldInfooldFieldInfo
FieldInfocontext
IConventionContext<FieldInfo>