StructuralTypeConfiguration<TStructuralType>.Property Method (Expression<Func<TStructuralType, String>>)
[This page is specific to the Entity Framework version 6. The latest version is available as the 'Entity Framework' NuGet package. For more information about Entity Framework, see msdn.com/data/ef.]
Configures a string property that is defined on this type.
Namespace: System.Data.Entity.ModelConfiguration.Configuration
Assembly: EntityFramework (in EntityFramework.dll)
Syntax
'Declaration
<SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")> _
<SuppressMessageAttribute("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")> _
Public Function Property ( _
propertyExpression As Expression(Of Func(Of TStructuralType, String)) _
) As StringPropertyConfiguration
'Usage
Dim instance As StructuralTypeConfiguration
Dim propertyExpression As Expression(Of Func(Of TStructuralType, String))
Dim returnValue As StringPropertyConfiguration
returnValue = instance.Property(propertyExpression)
[SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
[SuppressMessageAttribute("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")]
public StringPropertyConfiguration Property(
Expression<Func<TStructuralType, string>> propertyExpression
)
[SuppressMessageAttribute(L"Microsoft.Design", L"CA1006:DoNotNestGenericTypesInMemberSignatures")]
[SuppressMessageAttribute(L"Microsoft.Design", L"CA1011:ConsiderPassingBaseTypesAsParameters")]
public:
StringPropertyConfiguration^ Property(
Expression<Func<TStructuralType, String^>^>^ propertyExpression
)
[<SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")>]
[<SuppressMessageAttribute("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")>]
member Property :
propertyExpression:Expression<Func<'TStructuralType, string>> -> StringPropertyConfiguration
public function Property(
propertyExpression : Expression<Func<TStructuralType, String>>
) : StringPropertyConfiguration
Parameters
- propertyExpression
Type: System.Linq.Expressions.Expression<Func<TStructuralType, String>>
A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
Return Value
Type: System.Data.Entity.ModelConfiguration.Configuration.StringPropertyConfiguration
A configuration object that can be used to configure the property.
See Also
Reference
StructuralTypeConfiguration<TStructuralType> Class
System.Data.Entity.ModelConfiguration.Configuration Namespace