title: Entity Framework Code First: How to specify the index name
body: <p>I'm using code first to generate my database. I will also be using Full Text for searching. However, I cant create the full text index programatically because the primary key index name given by EF is random. Is there a way to explicitly set this?</p>
  
  <p>For example, I have an Items class like below:</p>
  
  <pre><code>public class Item
  {
  
      public string ItemId { get; set; }
      public string ShortName { get; set; }
      public decimal Price { get; set; }
      public string Description { get; set; }
      public string ImageUri { get; set; }
      public string Tags { get; set; }
  
      public int CategoryId { get; set; }
      public string LastModifiedBy { get; set; }
  
      public virtual User LastModifiedBy { get; set; }
      public virtual ItemCategory Category { get; set; }
      public virtual ICollection&lt;ItemMetaDataValue&gt; MetaData{get;set;}
      public virtual ICollection&lt;PriceHistoryLog&gt; PriceHistory { get; set; }
  }
  </code></pre>
  
  <p>Now I want to EF to create a full text catalog for the Tags property so I would call something like this using the DbContext.SqlCommand() method.</p>
  
  <pre><code>CREATE FULLTEXT CATALOG [DEFAULT]WITH ACCENT_SENSITIVITY = OFF
  AS DEFAULT
  AUTHORIZATION [dbo]
  
  CREATE FULLTEXT INDEX ON [dbo].[Items] KEY INDEX [PK__Items__727E838B07020F21] ON ([DEFAULT]) WITH (CHANGE_TRACKING AUTO)
  
  ALTER FULLTEXT INDEX ON [dbo].[Items] ADD ([Tags])
  
  ALTER FULLTEXT INDEX ON [dbo].[Items] ENABLE
  </code></pre>
  
  <p>However, as you might notice, the primary key index name is not what I expect it to be: PK_<em>Items</em>_727E838B07020F21. Is there anyway to explicitly specify this key? </p>
  
  <p>Thanks.</p>