Udostępnij za pośrednictwem


IConventionEntityTypeBuilder.GetTargetEntityTypeBuilder Metoda

Definicja

Pobiera lub tworzy konstruktora dla celu potencjalnej nawigacji.

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

Parametry

targetClrType
Type

Typ CLR obiektu docelowego.

navigationInfo
MemberInfo

Właściwość nawigacji.

createIfMissing
Boolean

Czy typ jednostki powinien zostać utworzony, jeśli nie jest obecnie w modelu.

targetShouldBeOwned
Nullable<Boolean>

Czy element docelowy powinien być własnością. null jeśli może to być albo.

fromDataAnnotation
Boolean

Wskazuje, czy konfiguracja została określona przy użyciu adnotacji danych.

Zwraca

Konstruktor typów jednostek lub null jeśli nie został znaleziony i nie można go utworzyć.

Dotyczy