IConventionEntityTypeBuilder.GetTargetEntityTypeBuilder Method
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.
Gets or creates a builder for the target of a potential navigation.
public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionEntityTypeBuilder? GetTargetEntityTypeBuilder (Type targetClrType, System.Reflection.MemberInfo navigationInfo, bool createIfMissing = true, bool? targetShouldBeOwned = default, bool fromDataAnnotation = false);
abstract member GetTargetEntityTypeBuilder : Type * System.Reflection.MemberInfo * bool * Nullable<bool> * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionEntityTypeBuilder
Public Function GetTargetEntityTypeBuilder (targetClrType As Type, navigationInfo As MemberInfo, Optional createIfMissing As Boolean = true, Optional targetShouldBeOwned As Nullable(Of Boolean) = Nothing, Optional fromDataAnnotation As Boolean = false) As IConventionEntityTypeBuilder
Parameters
- targetClrType
- Type
The CLR type of the target.
- navigationInfo
- MemberInfo
The navigation property.
- createIfMissing
- Boolean
Whether the entity type should be created if currently not in the model.
- fromDataAnnotation
- Boolean
Indicates whether the configuration was specified using a data annotation.
Returns
The entity type builder or null
if not found and can't be created.
Applies to
Entity Framework
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for