StructuralTypeConfiguration<TStructuralType>.EnumProperty Method
Namespace: System.Web.OData.Builder
Assembly: System.Web.OData (in System.Web.OData.dll)
Overload List
Name | Description | |
---|---|---|
EnumProperty<T>(Expression<Func<TStructuralType, T>>) | Adds a required enum property to the EDM type. |
|
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
propertyExpression
Type: System.Linq.Expressions.Expression<Func<TStructuralType, T>>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.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
propertyExpression
Type: System.Linq.Expressions.Expression<Func<TStructuralType, Nullable<T>>>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.EnumPropertyConfiguration
A configuration object that can be used to further configure the property.
Type Parameters
- T
The enum property type.
Return to top