Share via


NavigationSourceConfiguration<TEntityType>.HasSingletonBinding Method

 

Namespace:   System.Web.OData.Builder
Assembly:  System.Web.OData (in System.Web.OData.dll)

Overload List

Name Description
System_CAPS_pubmethod HasSingletonBinding<TTargetType>(Expression<Func<TEntityType, TTargetType>>, NavigationSourceConfiguration<TTargetType>)

Configures a required relationship from this entity type and binds the corresponding navigation property to the given singleton.

System_CAPS_pubmethod HasSingletonBinding<TTargetType>(Expression<Func<TEntityType, TTargetType>>, String)

Configures a required relationship from this entity type and binds the corresponding navigation property to the given singleton.

System_CAPS_pubmethod HasSingletonBinding<TTargetType, TDerivedEntityType>(Expression<Func<TDerivedEntityType, TTargetType>>, NavigationSourceConfiguration<TTargetType>)

Configures a required relationship from this entity type and binds the corresponding navigation property to the given singleton.

System_CAPS_pubmethod HasSingletonBinding<TTargetType, TDerivedEntityType>(Expression<Func<TDerivedEntityType, TTargetType>>, String)

Configures a required relationship from this entity type and binds the corresponding navigation property to the given singleton.

See Also

NavigationSourceConfiguration<TEntityType> Class
System.Web.OData.Builder Namespace

Return to top

Configures a required relationship from this entity type and binds the corresponding navigation property to the given singleton.

Syntax

public NavigationPropertyBindingConfiguration HasSingletonBinding<TTargetType>(
    Expression<Func<TEntityType, TTargetType>> navigationExpression,
    NavigationSourceConfiguration<TTargetType> targetSingleton
)
where TTargetType : class
public:
generic<typename TTargetType>
where TTargetType : ref class
NavigationPropertyBindingConfiguration^ HasSingletonBinding(
    Expression<Func<TEntityType, TTargetType>^>^ navigationExpression,
    NavigationSourceConfiguration<TTargetType>^ targetSingleton
)
member HasSingletonBinding<'TTargetType when 'TTargetType : not struct> : 
        navigationExpression:Expression<Func<'TEntityType, 'TTargetType>> *
        targetSingleton:NavigationSourceConfiguration<'TTargetType> -> NavigationPropertyBindingConfiguration
Public Function HasSingletonBinding(Of TTargetType As Class) (
    navigationExpression As Expression(Of Func(Of TEntityType, TTargetType)),
    targetSingleton As NavigationSourceConfiguration(Of TTargetType)
) As NavigationPropertyBindingConfiguration

Parameters

  • navigationExpression
    Type: System.Linq.Expressions.Expression<Func<TEntityType, TTargetType>>

    A lambda expression representing the navigation property for the relationship. For example, in C# t => t.MyProperty and in Visual Basic .NET Function(t) t.MyProperty.

Return Value

Type: System.Web.OData.Builder.NavigationPropertyBindingConfiguration

A configuration object that can be used to further configure the relationship further.

Type Parameters

  • TTargetType
    The target navigation source type.

Return to top

Configures a required relationship from this entity type and binds the corresponding navigation property to the given singleton.

Syntax

public NavigationPropertyBindingConfiguration HasSingletonBinding<TTargetType>(
    Expression<Func<TEntityType, TTargetType>> navigationExpression,
    string singletonName
)
where TTargetType : class
public:
generic<typename TTargetType>
where TTargetType : ref class
NavigationPropertyBindingConfiguration^ HasSingletonBinding(
    Expression<Func<TEntityType, TTargetType>^>^ navigationExpression,
    String^ singletonName
)
member HasSingletonBinding<'TTargetType when 'TTargetType : not struct> : 
        navigationExpression:Expression<Func<'TEntityType, 'TTargetType>> *
        singletonName:string -> NavigationPropertyBindingConfiguration
Public Function HasSingletonBinding(Of TTargetType As Class) (
    navigationExpression As Expression(Of Func(Of TEntityType, TTargetType)),
    singletonName As String
) As NavigationPropertyBindingConfiguration

Parameters

  • navigationExpression
    Type: System.Linq.Expressions.Expression<Func<TEntityType, TTargetType>>

    A lambda expression representing the navigation property for the relationship. For example, in C# t => t.MyProperty and in Visual Basic .NET Function(t) t.MyProperty.

  • singletonName
    Type: System.String

    The target navigation source (singleton) name for the binding.

Return Value

Type: System.Web.OData.Builder.NavigationPropertyBindingConfiguration

A configuration object that can be used to further configure the relationship further.

Type Parameters

  • TTargetType
    The target navigation source type.

Return to top

Configures a required relationship from this entity type and binds the corresponding navigation property to the given singleton.

Syntax

public NavigationPropertyBindingConfiguration HasSingletonBinding<TTargetType, TDerivedEntityType>(
    Expression<Func<TDerivedEntityType, TTargetType>> navigationExpression,
    NavigationSourceConfiguration<TTargetType> targetSingleton
)
where TTargetType : class
where TDerivedEntityType : class, TEntityType
public:
generic<typename TTargetType, typename TDerivedEntityType>
where TTargetType : ref class
where TDerivedEntityType : ref class, TEntityType
NavigationPropertyBindingConfiguration^ HasSingletonBinding(
    Expression<Func<TDerivedEntityType, TTargetType>^>^ navigationExpression,
    NavigationSourceConfiguration<TTargetType>^ targetSingleton
)
member HasSingletonBinding<'TTargetType, 'TDerivedEntityType when 'TTargetType : not struct when 'TDerivedEntityType : not struct and 'TEntityType> : 
        navigationExpression:Expression<Func<'TDerivedEntityType, 'TTargetType>> *
        targetSingleton:NavigationSourceConfiguration<'TTargetType> -> NavigationPropertyBindingConfiguration
Public Function HasSingletonBinding(Of TTargetType As Class, TDerivedEntityType As { Class, TEntityType }) (
    navigationExpression As Expression(Of Func(Of TDerivedEntityType, TTargetType)),
    targetSingleton As NavigationSourceConfiguration(Of TTargetType)
) As NavigationPropertyBindingConfiguration

Parameters

  • navigationExpression
    Type: System.Linq.Expressions.Expression<Func<TDerivedEntityType, TTargetType>>

    A lambda expression representing the navigation property for the relationship. For example, in C# t => t.MyProperty and in Visual Basic .NET Function(t) t.MyProperty.

Return Value

Type: System.Web.OData.Builder.NavigationPropertyBindingConfiguration

A configuration object that can be used to further configure the relationship further.

Type Parameters

  • TTargetType
    The target navigation source type.
  • TDerivedEntityType
    The target entity type.

Return to top

Configures a required relationship from this entity type and binds the corresponding navigation property to the given singleton.

Syntax

public NavigationPropertyBindingConfiguration HasSingletonBinding<TTargetType, TDerivedEntityType>(
    Expression<Func<TDerivedEntityType, TTargetType>> navigationExpression,
    string singletonName
)
where TTargetType : class
where TDerivedEntityType : class, TEntityType
public:
generic<typename TTargetType, typename TDerivedEntityType>
where TTargetType : ref class
where TDerivedEntityType : ref class, TEntityType
NavigationPropertyBindingConfiguration^ HasSingletonBinding(
    Expression<Func<TDerivedEntityType, TTargetType>^>^ navigationExpression,
    String^ singletonName
)
member HasSingletonBinding<'TTargetType, 'TDerivedEntityType when 'TTargetType : not struct when 'TDerivedEntityType : not struct and 'TEntityType> : 
        navigationExpression:Expression<Func<'TDerivedEntityType, 'TTargetType>> *
        singletonName:string -> NavigationPropertyBindingConfiguration
Public Function HasSingletonBinding(Of TTargetType As Class, TDerivedEntityType As { Class, TEntityType }) (
    navigationExpression As Expression(Of Func(Of TDerivedEntityType, TTargetType)),
    singletonName As String
) As NavigationPropertyBindingConfiguration

Parameters

  • navigationExpression
    Type: System.Linq.Expressions.Expression<Func<TDerivedEntityType, TTargetType>>

    A lambda expression representing the navigation property for the relationship. For example, in C# t => t.MyProperty and in Visual Basic .NET Function(t) t.MyProperty.

  • singletonName
    Type: System.String

    The target navigation source (singleton) name for the binding.

Return Value

Type: System.Web.OData.Builder.NavigationPropertyBindingConfiguration

A configuration object that can be used to further configure the relationship further.

Type Parameters

  • TTargetType
    The target navigation source type.
  • TDerivedEntityType
    The target entity type.

Return to top