title: Creating Unique Index with Entity Framework 6.1 fluent API
body: <p>I have a column "Name" that must be unqiue. No foreign key or anything like that.</p>
  
  <p>EF 6.1 finally supports creating such indexes via Annotations. That has been discussed already on SO. But it seems it can only be done via annotations in the classes. How do I do that using only the Fluent API?</p>
  
  <p>Something like this:</p>
  
  <pre><code>public class PersonConfiguration : EntityTypeConfiguration&lt;Person&gt;
  {
      public PersonConfiguration()
      {
          HasKey(p =&gt; p.Id);
          Property(p =&gt; p.Id).HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);
  
          //not possible?
          Index(p =&gt; p.Name).IsUnique();  //???
      }
  }
  </code></pre>