The fluent API is mainly targeted at mapping, not database design. I think it should stay that way. API's shouldn't mix concerns. Rules concerning clustered indexes don't belong in a mapping API. It has no bearing on a mapping whether an index is clustered or not. Moreover the rules on clustered indexes are database-specific, so they can be only be implemented in a Provider. But the mapping API has no knowledge of any provider.
In my personal opinion, even the IndexAttribute
(introduced in EF 6.1) was an insensible compromise. (Although apparently it preluded on mapping foreign key associations to unique indexes, which will be supported in EF7).
Conversely, the HasKey
method, although deeply involved in database design rules too, does make sense, because EF needs to know an entity's primary key. It's pivotal in all CRUD actions. And 'primary key' is a concept that all RDBMS vendors share.