Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

TableBuilder<TColumns>.Index Method

Entity Framework 5.0

Specifies an index to be created on the table.

Namespace:  System.Data.Entity.Migrations.Builders
Assembly:  EntityFramework (in EntityFramework.dll)
public TableBuilder<TColumns> Index(
	Expression<Func<TColumns, Object>> indexExpression,
	bool unique,
	Object anonymousArguments
)

Parameters

indexExpression
Type: System.Linq.Expressions.Expression<Func<TColumns, Object>>

A lambda expression representing the property to be indexed.

If multiple properties are to be indexed then specify an anonymous type including the properties.

unique
Type: System.Boolean

A value indicating whether or not this is a unique index.

anonymousArguments
Type: System.Object

Additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'.

Return Value

Type: System.Data.Entity.Migrations.Builders.TableBuilder<TColumns>
Itself, so that multiple calls can be chained.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.