Share via


StructuralTypeConfiguration<TStructuralType>.EnumProperty Method

Definition

Overloads

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

Adds an optional enum property to the EDM type.

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.

public Microsoft.AspNet.OData.Builder.EnumPropertyConfiguration EnumProperty<T> (System.Linq.Expressions.Expression<Func<TStructuralType,T?>> propertyExpression) where T : struct;
member this.EnumProperty : System.Linq.Expressions.Expression<Func<'StructuralType, Nullable<'T>>> -> Microsoft.AspNet.OData.Builder.EnumPropertyConfiguration (requires 'T : struct)
Public Function EnumProperty(Of T As Structure) (propertyExpression As Expression(Of Func(Of TStructuralType, Nullable(Of T)))) As EnumPropertyConfiguration

Type Parameters

T

The enum property type.

Parameters

propertyExpression
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.

Returns

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

Applies to

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

Adds a required enum property to the EDM type.

public Microsoft.AspNet.OData.Builder.EnumPropertyConfiguration EnumProperty<T> (System.Linq.Expressions.Expression<Func<TStructuralType,T>> propertyExpression) where T : struct;
member this.EnumProperty : System.Linq.Expressions.Expression<Func<'StructuralType, 'T>> -> Microsoft.AspNet.OData.Builder.EnumPropertyConfiguration (requires 'T : struct)
Public Function EnumProperty(Of T As Structure) (propertyExpression As Expression(Of Func(Of TStructuralType, T))) As EnumPropertyConfiguration

Type Parameters

T

The enum property type.

Parameters

propertyExpression
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.

Returns

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

Applies to