StructuralTypeConfiguration<TStructuralType>.Property Method

 

Configures the defined type property.

Namespace:   System.Data.Entity.ModelConfiguration.Configuration
Assembly:  EntityFramework (in EntityFramework.dll)

NameDescription
System_CAPS_pubmethodProperty(Expression<Func<TStructuralType, Byte[]>>)

Configures a T:System.byte[] property that is defined on this type.

System_CAPS_pubmethodProperty(Expression<Func<TStructuralType, DateTime>>)

Configures a DateTime property that is defined on this type.

System_CAPS_pubmethodProperty(Expression<Func<TStructuralType, DateTimeOffset>>)

Configures a DateTimeOffset property that is defined on this type.

System_CAPS_pubmethodProperty(Expression<Func<TStructuralType, DbGeography>>)

Configures a T:DbGeography property that is defined on this type.

System_CAPS_pubmethodProperty(Expression<Func<TStructuralType, DbGeometry>>)

Configures a T:DbGeometry property that is defined on this type.

System_CAPS_pubmethodProperty(Expression<Func<TStructuralType, Decimal>>)

Configures a T:System.decimal property that is defined on this type.

System_CAPS_pubmethodProperty(Expression<Func<TStructuralType, Nullable<DateTime>>>)

Configures a T:System.DateTime? property that is defined on this type.

System_CAPS_pubmethodProperty(Expression<Func<TStructuralType, Nullable<DateTimeOffset>>>)

Configures a T:System.DateTimeOffset? property that is defined on this type.

System_CAPS_pubmethodProperty(Expression<Func<TStructuralType, Nullable<Decimal>>>)

Configures a T:System.decimal? property that is defined on this type.

System_CAPS_pubmethodProperty(Expression<Func<TStructuralType, Nullable<TimeSpan>>>)

Configures a T:System.TimeSpan? property that is defined on this type.

System_CAPS_pubmethodProperty(Expression<Func<TStructuralType, String>>)

Configures a T:System.string property that is defined on this type.

System_CAPS_pubmethodProperty(Expression<Func<TStructuralType, TimeSpan>>)

Configures a TimeSpan property that is defined on this type.

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

Configures a T:System.struct property that is defined on this type.

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

Configures a T:System.struct? property that is defined on this type.


StructuralTypeConfiguration<TStructuralType>.Property Method (Expression<Func<TStructuralType, Byte[]>>)

Configures a T:System.byte[] property that is defined on this type.

[SuppressMessageAttribute("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")]
[SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
public BinaryPropertyConfiguration Property(
	Expression<Func<TStructuralType, byte[]>> propertyExpression
)

Parameters

propertyExpression
Type: System.Linq.Expressions.Expression<Func<TStructuralType, Byte[]>>

A lambda expression representing the property to be configured. C#: t =&gt; t.MyProperty VB.Net: Function(t) t.MyProperty

Return Value

Type: System.Data.Entity.ModelConfiguration.Configuration.BinaryPropertyConfiguration

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


StructuralTypeConfiguration<TStructuralType>.Property Method (Expression<Func<TStructuralType, DateTime>>)

Configures a DateTime property that is defined on this type.

[SuppressMessageAttribute("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")]
[SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
public DateTimePropertyConfiguration Property(
	Expression<Func<TStructuralType, DateTime>> propertyExpression
)

Parameters

propertyExpression
Type: System.Linq.Expressions.Expression<Func<TStructuralType, DateTime>>

A lambda expression representing the property to be configured. C#: t =&gt; t.MyProperty VB.Net: Function(t) t.MyProperty

Return Value

Type: System.Data.Entity.ModelConfiguration.Configuration.DateTimePropertyConfiguration

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


StructuralTypeConfiguration<TStructuralType>.Property Method (Expression<Func<TStructuralType, DateTimeOffset>>)

Configures a DateTimeOffset property that is defined on this type.

[SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
[SuppressMessageAttribute("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")]
public DateTimePropertyConfiguration Property(
	Expression<Func<TStructuralType, DateTimeOffset>> propertyExpression
)

Parameters

propertyExpression
Type: System.Linq.Expressions.Expression<Func<TStructuralType, DateTimeOffset>>

A lambda expression representing the property to be configured. C#: t =&gt; t.MyProperty VB.Net: Function(t) t.MyProperty

Return Value

Type: System.Data.Entity.ModelConfiguration.Configuration.DateTimePropertyConfiguration

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


StructuralTypeConfiguration<TStructuralType>.Property Method (Expression<Func<TStructuralType, DbGeography>>)

Configures a T:DbGeography property that is defined on this type.

[SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
[SuppressMessageAttribute("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")]
public PrimitivePropertyConfiguration Property(
	Expression<Func<TStructuralType, DbGeography>> propertyExpression
)

Parameters

propertyExpression
Type: System.Linq.Expressions.Expression<Func<TStructuralType, DbGeography>>

A lambda expression representing the property to be configured. C#: t =&gt; t.MyProperty VB.Net: Function(t) t.MyProperty

Return Value

Type: System.Data.Entity.ModelConfiguration.Configuration.PrimitivePropertyConfiguration

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


StructuralTypeConfiguration<TStructuralType>.Property Method (Expression<Func<TStructuralType, DbGeometry>>)

Configures a T:DbGeometry property that is defined on this type.

[SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
[SuppressMessageAttribute("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")]
public PrimitivePropertyConfiguration Property(
	Expression<Func<TStructuralType, DbGeometry>> propertyExpression
)

Parameters

propertyExpression
Type: System.Linq.Expressions.Expression<Func<TStructuralType, DbGeometry>>

A lambda expression representing the property to be configured. C#: t =&gt; t.MyProperty VB.Net: Function(t) t.MyProperty

Return Value

Type: System.Data.Entity.ModelConfiguration.Configuration.PrimitivePropertyConfiguration

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


StructuralTypeConfiguration<TStructuralType>.Property Method (Expression<Func<TStructuralType, Decimal>>)

Configures a T:System.decimal property that is defined on this type.

[SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
[SuppressMessageAttribute("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")]
public DecimalPropertyConfiguration Property(
	Expression<Func<TStructuralType, decimal>> propertyExpression
)

Parameters

propertyExpression
Type: System.Linq.Expressions.Expression<Func<TStructuralType, Decimal>>

A lambda expression representing the property to be configured. C#: t =&gt; t.MyProperty VB.Net: Function(t) t.MyProperty

Return Value

Type: System.Data.Entity.ModelConfiguration.Configuration.DecimalPropertyConfiguration

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


StructuralTypeConfiguration<TStructuralType>.Property Method (Expression<Func<TStructuralType, Nullable<DateTime>>>)

Configures a T:System.DateTime? property that is defined on this type.

[SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
[SuppressMessageAttribute("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")]
public DateTimePropertyConfiguration Property(
	Expression<Func<TStructuralType, Nullable<DateTime>>> propertyExpression
)

Parameters

propertyExpression
Type: System.Linq.Expressions.Expression<Func<TStructuralType, Nullable<DateTime>>>

A lambda expression representing the property to be configured. C#: t =&gt; t.MyProperty VB.Net: Function(t) t.MyProperty

Return Value

Type: System.Data.Entity.ModelConfiguration.Configuration.DateTimePropertyConfiguration

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


StructuralTypeConfiguration<TStructuralType>.Property Method (Expression<Func<TStructuralType, Nullable<DateTimeOffset>>>)

Configures a T:System.DateTimeOffset? property that is defined on this type.

[SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
[SuppressMessageAttribute("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")]
public DateTimePropertyConfiguration Property(
	Expression<Func<TStructuralType, Nullable<DateTimeOffset>>> propertyExpression
)

Parameters

propertyExpression
Type: System.Linq.Expressions.Expression<Func<TStructuralType, Nullable<DateTimeOffset>>>

A lambda expression representing the property to be configured. C#: t =&gt; t.MyProperty VB.Net: Function(t) t.MyProperty

Return Value

Type: System.Data.Entity.ModelConfiguration.Configuration.DateTimePropertyConfiguration

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


StructuralTypeConfiguration<TStructuralType>.Property Method (Expression<Func<TStructuralType, Nullable<Decimal>>>)

Configures a T:System.decimal? property that is defined on this type.

[SuppressMessageAttribute("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")]
[SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
public DecimalPropertyConfiguration Property(
	Expression<Func<TStructuralType, Nullable<decimal>>> propertyExpression
)

Parameters

propertyExpression
Type: System.Linq.Expressions.Expression<Func<TStructuralType, Nullable<Decimal>>>

A lambda expression representing the property to be configured. C#: t =&gt; t.MyProperty VB.Net: Function(t) t.MyProperty

Return Value

Type: System.Data.Entity.ModelConfiguration.Configuration.DecimalPropertyConfiguration

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


StructuralTypeConfiguration<TStructuralType>.Property Method (Expression<Func<TStructuralType, Nullable<TimeSpan>>>)

Configures a T:System.TimeSpan? property that is defined on this type.

[SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
[SuppressMessageAttribute("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")]
public DateTimePropertyConfiguration Property(
	Expression<Func<TStructuralType, Nullable<TimeSpan>>> propertyExpression
)

Parameters

propertyExpression
Type: System.Linq.Expressions.Expression<Func<TStructuralType, Nullable<TimeSpan>>>

A lambda expression representing the property to be configured. C#: t =&gt; t.MyProperty VB.Net: Function(t) t.MyProperty

Return Value

Type: System.Data.Entity.ModelConfiguration.Configuration.DateTimePropertyConfiguration

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


StructuralTypeConfiguration<TStructuralType>.Property Method (Expression<Func<TStructuralType, String>>)

Configures a T:System.string property that is defined on this type.

[SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
[SuppressMessageAttribute("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")]
public StringPropertyConfiguration Property(
	Expression<Func<TStructuralType, string>> propertyExpression
)

Parameters

propertyExpression
Type: System.Linq.Expressions.Expression<Func<TStructuralType, String>>

A lambda expression representing the property to be configured. C#: t =&gt; 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.


StructuralTypeConfiguration<TStructuralType>.Property Method (Expression<Func<TStructuralType, TimeSpan>>)

Configures a TimeSpan property that is defined on this type.

[SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
[SuppressMessageAttribute("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")]
public DateTimePropertyConfiguration Property(
	Expression<Func<TStructuralType, TimeSpan>> propertyExpression
)

Parameters

propertyExpression
Type: System.Linq.Expressions.Expression<Func<TStructuralType, TimeSpan>>

A lambda expression representing the property to be configured. C#: t =&gt; t.MyProperty VB.Net: Function(t) t.MyProperty

Return Value

Type: System.Data.Entity.ModelConfiguration.Configuration.DateTimePropertyConfiguration

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


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

Configures a T:System.struct property that is defined on this type.

[SuppressMessageAttribute("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")]
[SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
public PrimitivePropertyConfiguration Property<T>(
	Expression<Func<TStructuralType, T>> propertyExpression
)
where T : struct

Parameters

propertyExpression
Type: System.Linq.Expressions.Expression<Func<TStructuralType, T>>

A lambda expression representing the property to be configured. C#: t =&gt; t.MyProperty VB.Net: Function(t) t.MyProperty

Return Value

Type: System.Data.Entity.ModelConfiguration.Configuration.PrimitivePropertyConfiguration

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

Type Parameters

T

The type of the property being configured.


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

Configures a T:System.struct? property that is defined on this type.

[SuppressMessageAttribute("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")]
[SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
public PrimitivePropertyConfiguration Property<T>(
	Expression<Func<TStructuralType, Nullable<T>>> propertyExpression
)
where T : struct

Parameters

propertyExpression
Type: System.Linq.Expressions.Expression<Func<TStructuralType, Nullable<T>>>

A lambda expression representing the property to be configured. C#: t =&gt; t.MyProperty VB.Net: Function(t) t.MyProperty

Return Value

Type: System.Data.Entity.ModelConfiguration.Configuration.PrimitivePropertyConfiguration

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

Type Parameters

T

The type of the property being configured.