Share via


OptionalNavigationPropertyConfiguration<TEntityType,TTargetEntityType> Class

Definition

Configures an optional relationship from an entity type.

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

Type Parameters

TEntityType

The entity type that the relationship originates from.

TTargetEntityType

The entity type that the relationship targets.

Inheritance
OptionalNavigationPropertyConfiguration<TEntityType,TTargetEntityType>

Methods

Equals(Object)

Determines whether the specified object is equal to the current object.

GetHashCode()

Serves as the default hash function.

GetType()

Gets the Type of the current instance.

ToString()

Returns a string that represents the current object.

WithMany()

Configures the relationship to be optional:many without a navigation property on the other side of the relationship.

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

Configures the relationship to be optional:many with a navigation property on the other side of the relationship.

WithOptionalDependent()

Configures the relationship to be optional:optional without a navigation property on the other side of the relationship. The entity type being configured will be the dependent and contain a foreign key to the principal. The entity type that the relationship targets will be the principal in the relationship.

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

Configures the relationship to be optional:optional with a navigation property on the other side of the relationship. The entity type being configured will be the dependent and contain a foreign key to the principal. The entity type that the relationship targets will be the principal in the relationship.

WithOptionalPrincipal()

Configures the relationship to be optional:optional without a navigation property on the other side of the relationship. The entity type being configured will be the principal in the relationship. The entity type that the relationship targets will be the dependent and contain a foreign key to the principal.

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

Configures the relationship to be optional:optional with a navigation property on the other side of the relationship. The entity type being configured will be the principal in the relationship. The entity type that the relationship targets will be the dependent and contain a foreign key to the principal.

WithRequired()

Configures the relationship to be optional:required without a navigation property on the other side of the relationship.

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

Configures the relationship to be optional:required with a navigation property on the other side of the relationship.

Applies to