Megosztás a következőn keresztül:


CosmosInversePropertyAttributeConvention.TryGetTargetEntityTypeBuilder Method

Definition

Finds or tries to create an entity type target for the given navigation member.

protected override Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionEntityTypeBuilder? TryGetTargetEntityTypeBuilder (Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionEntityTypeBuilder entityTypeBuilder, Type targetClrType, System.Reflection.MemberInfo navigationMemberInfo, bool shouldCreate = true);
override this.TryGetTargetEntityTypeBuilder : Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionEntityTypeBuilder * Type * System.Reflection.MemberInfo * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionEntityTypeBuilder
Protected Overrides Function TryGetTargetEntityTypeBuilder (entityTypeBuilder As IConventionEntityTypeBuilder, targetClrType As Type, navigationMemberInfo As MemberInfo, Optional shouldCreate As Boolean = true) As IConventionEntityTypeBuilder

Parameters

entityTypeBuilder
IConventionEntityTypeBuilder

The builder for the referencing entity type.

targetClrType
Type

The CLR type of the target entity type.

navigationMemberInfo
MemberInfo

The navigation member.

shouldCreate
Boolean

Whether an entity type should be created if one doesn't currently exist.

Returns

The builder for the target entity type or null if it can't be created.

Applies to