RequiredNavigationPropertyConfiguration<TEntityType,TTargetEntityType> Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Entity Framework