src/Shared/EntityFramework/ModelConfiguration/EntityTypeConfiguration.cs
/// <summary>
/// Configures index property(s) for this entity type.
/// </summary>
/// <typeparam name="TIndex"> The type of the index. </typeparam>
/// <param name="indexExpression"> A lambda expression representing the property to apply an index to. C#: t => t.Id VB.Net: Function(t) t.Id If the index is made up of multiple properties then specify an anonymous type including the properties. C#: t => new { t.Id1, t.Id2 } VB.Net: Function(t) New With { t.Id1, t.Id2 } </param>
/// <returns> The IndexConfiguration instance so that the index can be further configured. </returns>
Configures index property(s) for this entity type.
Configures index property ( s ) for this entity type .
[SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
        [SuppressMessage("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")]
        public IndexConfiguration HasIndex<TIndex>(Expression<Func<TEntityType, TIndex>> indexExpression)
        {
            Check.NotNull(indexExpression, "indexExpression");
            var indexProperties = indexExpression.GetSimplePropertyAccessList().Select(p => p.Single());
            return new IndexConfiguration(
                _entityTypeConfiguration.Index(new PropertyPath(indexProperties)));
        }
[ SuppressMessage ( " " , " " ) ] [ SuppressMessage ( " " , " " ) ] public IndexConfiguration HasIndex < TIndex > ( Expression < Func < TEntityType , TIndex > > indexExpression ) { Check . NotNull ( indexExpression , " " ) ; var indexProperties = indexExpression . GetSimplePropertyAccessList ( ) . Select ( p => p . Single ( ) ) ; return new IndexConfiguration ( _entityTypeConfiguration . Index ( new PropertyPath ( indexProperties ) ) ) ; }
Configures index property(s) for this entity type.
Configures index property ( s ) for this entity type .
The IndexConfiguration instance so that the index can be further configured.
The IndexConfiguration instance so that the index can be further configured .
indexExpression
Expression<Func<TEntityType, TIndex>>
A lambda expression representing the property to apply an index to. C#: t => t.Id VB.Net: Function(t) t.Id If the index is made up of multiple properties then specify an anonymous type including the properties.
A lambda expression representing the property to apply an index to . C# : t = > t . Id VB . Net : Function ( t ) t . Id If the index is made up of multiple properties then specify an anonymous type including the properties .
typeparam
The type of the index.
The type of the index .