IConventionEntityTypeBuilder.CanHaveNavigation Method
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.
Overloads
CanHaveNavigation(MemberInfo, Boolean) |
Returns a value indicating whether the given navigation can be added to this entity type. |
CanHaveNavigation(String, Boolean) |
Obsolete.
Returns a value indicating whether the given navigation can be added to this entity type. |
CanHaveNavigation(String, Type, Boolean) |
Returns a value indicating whether the given navigation can be added to this entity type. |
CanHaveNavigation(MemberInfo, Boolean)
Returns a value indicating whether the given navigation can be added to this entity type.
public virtual bool CanHaveNavigation (System.Reflection.MemberInfo navigation, bool fromDataAnnotation = false);
abstract member CanHaveNavigation : System.Reflection.MemberInfo * bool -> bool
override this.CanHaveNavigation : System.Reflection.MemberInfo * bool -> bool
Public Overridable Function CanHaveNavigation (navigation As MemberInfo, Optional fromDataAnnotation As Boolean = false) As Boolean
Parameters
- navigation
- MemberInfo
The navigation member.
- fromDataAnnotation
- Boolean
Indicates whether the configuration was specified using a data annotation.
Returns
true
if the configuration can be applied.
Applies to
CanHaveNavigation(String, Boolean)
Caution
Use CanHaveNavigation with Type parameter
Returns a value indicating whether the given navigation can be added to this entity type.
public bool CanHaveNavigation (string navigationName, bool fromDataAnnotation = false);
[System.Obsolete("Use CanHaveNavigation with Type parameter")]
public bool CanHaveNavigation (string navigationName, bool fromDataAnnotation = false);
abstract member CanHaveNavigation : string * bool -> bool
[<System.Obsolete("Use CanHaveNavigation with Type parameter")>]
abstract member CanHaveNavigation : string * bool -> bool
Public Function CanHaveNavigation (navigationName As String, Optional fromDataAnnotation As Boolean = false) As Boolean
Parameters
- navigationName
- String
The name of the navigation.
- fromDataAnnotation
- Boolean
Indicates whether the configuration was specified using a data annotation.
Returns
true
if the configuration can be applied.
- Attributes
Applies to
CanHaveNavigation(String, Type, Boolean)
Returns a value indicating whether the given navigation can be added to this entity type.
public bool CanHaveNavigation (string navigationName, Type? type, bool fromDataAnnotation = false);
abstract member CanHaveNavigation : string * Type * bool -> bool
Public Function CanHaveNavigation (navigationName As String, type As Type, Optional fromDataAnnotation As Boolean = false) As Boolean
Parameters
- navigationName
- String
The name of the navigation.
- type
- Type
The type of the navigation target.
- fromDataAnnotation
- Boolean
Indicates whether the configuration was specified using a data annotation.
Returns
true
if the skip navigation can be added.
Applies to
Entity Framework