Share via


StructuralTypeConfiguration<TStructuralType>.EnumProperty Method

 

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

Overload List

Name Description
System_CAPS_pubmethod EnumProperty<T>(Expression<Func<TStructuralType, T>>)

Adds a required enum property to the EDM type.

System_CAPS_pubmethod EnumProperty<T>(Expression<Func<TStructuralType, Nullable<T>>>)

Adds an optional enum property to the EDM type.

See Also

StructuralTypeConfiguration<TStructuralType> Class
System.Web.OData.Builder Namespace

Return to top

StructuralTypeConfiguration<TStructuralType>.EnumProperty<T> Method (Expression<Func<TStructuralType, T>>)

Adds a required enum property to the EDM type.

Syntax

public EnumPropertyConfiguration EnumProperty<T>(
    Expression<Func<TStructuralType, T>> propertyExpression
)
where T : struct
public:
generic<typename T>
where T : value struct, gcnew()
EnumPropertyConfiguration^ EnumProperty(
    Expression<Func<TStructuralType, T>^>^ propertyExpression
)
member EnumProperty<'T when 'T : struct> : 
        propertyExpression:Expression<Func<'TStructuralType, 'T>> -> EnumPropertyConfiguration
Public Function EnumProperty(Of T As Structure) (
    propertyExpression As Expression(Of Func(Of TStructuralType, T))
) As EnumPropertyConfiguration

Parameters

Return Value

Type: System.Web.OData.Builder.EnumPropertyConfiguration

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

Type Parameters

  • T
    The enum property type.

Return to top

StructuralTypeConfiguration<TStructuralType>.EnumProperty<T> Method (Expression<Func<TStructuralType, Nullable<T>>>)

Adds an optional enum property to the EDM type.

Syntax

public EnumPropertyConfiguration EnumProperty<T>(
    Expression<Func<TStructuralType, Nullable<T>>> propertyExpression
)
where T : struct
public:
generic<typename T>
where T : value struct, gcnew()
EnumPropertyConfiguration^ EnumProperty(
    Expression<Func<TStructuralType, Nullable<T>>^>^ propertyExpression
)
member EnumProperty<'T when 'T : struct> : 
        propertyExpression:Expression<Func<'TStructuralType, Nullable<'T>>> -> EnumPropertyConfiguration
Public Function EnumProperty(Of T As Structure) (
    propertyExpression As Expression(Of Func(Of TStructuralType, Nullable(Of T)))
) As EnumPropertyConfiguration

Parameters

Return Value

Type: System.Web.OData.Builder.EnumPropertyConfiguration

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

Type Parameters

  • T
    The enum property type.

Return to top