Share via


RequiredNavigationPropertyConfiguration<TEntityType,TTargetEntityType> Class

Definition

Configures an required relationship from an entity type.

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)

Type Parameters

TEntityType

The entity type that the relationship originates from.

TTargetEntityType

The entity type that the relationship targets.

Inheritance
RequiredNavigationPropertyConfiguration<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 required:many without a navigation property on the other side of the relationship.

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

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

WithOptional()

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

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

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

WithRequiredDependent()

Configures the relationship to be required:required 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.

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

Configures the relationship to be required:required 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.

WithRequiredPrincipal()

Configures the relationship to be required:required 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.

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

Configures the relationship to be required:required 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.

Applies to