共用方式為


RequiredNavigationPropertyConfiguration<TEntityType,TTargetEntityType> 類別

定義

從實體類型設定必要的關聯性。

public class RequiredNavigationPropertyConfiguration<TEntityType,TTargetEntityType> where TEntityType : class where TTargetEntityType : class
type RequiredNavigationPropertyConfiguration<'EntityType, 'argetEntityType (requires 'EntityType : null and 'argetEntityType : null)> = class
Public Class RequiredNavigationPropertyConfiguration(Of TEntityType, TTargetEntityType)

類型參數

TEntityType

關聯性源自的實體型別。

TTargetEntityType

關聯性針對的實體型別。

繼承
RequiredNavigationPropertyConfiguration<TEntityType,TTargetEntityType>

方法

Equals(Object)

從實體類型設定必要的關聯性。

GetHashCode()

從實體類型設定必要的關聯性。

GetType()

取得目前執行個體的 Type

ToString()

從實體類型設定必要的關聯性。

WithMany()

將關聯性設定為 required:many,而且在關聯性的另一端沒有導覽屬性。

WithMany(Expression<Func<TTargetEntityType,ICollection<TEntityType>>>)

將關聯性設定為 required:many,而且在關聯性的另一端有導覽屬性。

WithOptional()

將關聯性設定為 required:optional,而且在關聯性的另一端沒有導覽屬性。

WithOptional(Expression<Func<TTargetEntityType,TEntityType>>)

將關聯性設定為 required:optional,而且在關聯性的另一端有導覽屬性。

WithRequiredDependent()

將關聯性設定為 required:required,而且在關聯性的另一端沒有導覽屬性。 正在設定的實體型別將會是相依項,而且包含主體的外部索引鍵。 關聯性所針對的實體型別將會是關聯性中的主體。

WithRequiredDependent(Expression<Func<TTargetEntityType,TEntityType>>)

將關聯性設定為 required:required,而且在關聯性的另一端有導覽屬性。 正在設定的實體型別將會是相依項,而且包含主體的外部索引鍵。 關聯性所針對的實體型別將會是關聯性中的主體。

WithRequiredPrincipal()

將關聯性設定為 required:required,而且在關聯性的另一端沒有導覽屬性。 正在設定的實體型別將會是關聯性中的主體。 關聯性所針對的實體型別將會是相依項,而且包含主體的外部索引鍵。

WithRequiredPrincipal(Expression<Func<TTargetEntityType,TEntityType>>)

將關聯性設定為 required:required,而且在關聯性的另一端有導覽屬性。 正在設定的實體型別將會是關聯性中的主體。 關聯性所針對的實體型別將會是相依項,而且包含主體的外部索引鍵。

適用於