src/Shared/EntityFramework/ModelConfiguration/Configuration/Types/ConventionTypeConfiguration.cs
/// <summary>
/// Configures the primary key property(s) for this entity type.
/// </summary>
/// <param name="propertyNames"> The names of the properties to be used as the primary key. </param>
/// <returns>
/// The same <see cref="ConventionTypeConfiguration" /> instance so that multiple calls can be chained.
/// </returns>
Configures the primary key property(s) for this entity type.
Configures the primary key property ( s ) for this entity type .
public ConventionTypeConfiguration HasKey(IEnumerable<string> propertyNames)
        {
            Check.NotNull(propertyNames, "propertyNames");
            var propertyInfos = propertyNames
                .Select(
                    n =>
                    {
                        var propertyInfo = _type.GetInstanceProperty(n);
                        if (propertyInfo == null)
                        {
                            throw new InvalidOperationException(Strings.NoSuchProperty(n, _type.Name));
                        }
                        return propertyInfo;
                    })
                .ToArray();
            return HasKey(propertyInfos);
        }
public ConventionTypeConfiguration HasKey ( IEnumerable < string > propertyNames ) { Check . NotNull ( propertyNames , " " ) ; var propertyInfos = propertyNames . Select ( n => { var propertyInfo = _type . GetInstanceProperty ( n ) ; if ( propertyInfo == null ) { throw new InvalidOperationException ( Strings . NoSuchProperty ( n , _type . Name ) ) ; } return propertyInfo ; } ) . ToArray ( ) ; return HasKey ( propertyInfos ) ; }
Configures the primary key property(s) for this entity type.
Configures the primary key property ( s ) for this entity type .
The same  instance so that multiple calls can be chained.
The same instance so that multiple calls can be chained .
propertyNames
IEnumerable<string>
The names of the properties to be used as the primary key.
The names of the properties to be used as the primary key .