API

HasIndex

Declares a model index to be realized by schema management.

Formal Syntax & Structure

csharp syntaxcsharp
model.Entity<Book>().HasIndex(b => b.Title)

Working Example

Example Snippetcsharp
// Documentary fragment; see mapped lesson for context.model.Entity<Book>().HasIndex(b => b.Title)
C# & .NET Reference