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,且在关系的另一端有导航属性。 要配置的实体类型将成为关系中的主体。 作为关系目标的实体类型将成为依赖对象,且包含主体的外键。

适用于