title: How to customize migration identity column's parameters?
body: <p>I Have this simple model:</p>
  
  <pre><code>public class Code{
      public int Id { get; set; }
      public string Name { get; set; }
  }
  </code></pre>
  
  <p>in my domain. The <code>Id</code> is the primary key. Generating a migration for the class, would result this code:</p>
  
  <pre><code>CreateTable(
      "dbo.Codes",
      c =&gt; new {
          Id = c.Int(nullable: false, identity: true),
          Name = c.String(),
      })
      .PrimaryKey(t =&gt; t.Id);
  </code></pre>
  
  <p>This will obviously generates this T-SQL script:</p>
  
  <pre><code>CREATE TABLE [dbo].[Codes] (
      [Id] [int] IDENTITY NOT NULL,
      [Name] [nvarchar](max),
      CONSTRAINT [PK_dbo.Codes] PRIMARY KEY ([Id])
  )
  </code></pre>
  
  <p>OK. The problem is that I want to customize the identity column's seed and increment values. To doing that, the generated script needs be this one (for 100000 as seed and 23 as increment value, for example):</p>
  
  <pre><code>CREATE TABLE [dbo].[Codes] (
      [Id] [int] IDENTITY (100000, 23) NOT NULL,
      [Name] [nvarchar](max),
      CONSTRAINT [PK_dbo.Codes] PRIMARY KEY ([Id])
  )
  </code></pre>
  
  <p>So, the question is, how can I modify the generated migration to accept <code>(100000, 23)</code>? Is there any way at all?</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>It seems I have to note some points (my English is too bad, so excuse me if some points are not cleared).</p>
  
  <p>I'm aware of <code>DBCC CHECKIDENT</code> command. It's not the answer. Because:</p>
  
  <ol>
  <li><p>It's just about reseeding the identity column. Not customizing increment value.</p></li>
  <li><p>It works, after table created. In my case, I'm trying to do the job while creating table.</p></li>
  <li><p>For resetting the increment value, table needs to be re-created - as far as I know. I'm NOT trying to RE-SET increment, neither the seed. I'm trying to SET them.</p></li>
  <li><p>The question is not about altering db, or using SQL commands, or something like. I'm curious if the migration can be modified to customize the generated SQL. </p></li>
  </ol>