title: How to specify a composite primary key using EFCore Code First Migrations
body: <p>I'm using Asp.Net Core 2.1, Mvc, c#, EF Core with Code First and Migrations.</p>
  
  <p>I'm trying to build a table that has a composite primary key in the <code>Migration.Up()</code> method:</p>
  
  
  
  <pre class="lang-cs prettyprint-override"><code>migrationBuilder.CreateTable(
      name: "TagValueAttributes",
      columns: table =&gt; new {
          TagValueID = table.Column&lt;Int64&gt;(nullable: false),
          Identifier = table.Column&lt;string&gt;(nullable: false, unicode: true, maxLength: 256),
          Value = table.Column&lt;string&gt;(nullable: true, unicode: true, maxLength: 2048)
      },
      constraints: table =&gt; {
          table.PrimaryKey(
              name: "PK_TagValueAttributes",
              columns: // what goes here???
          )
      }
  );
  </code></pre>
  
  <p>I don't know what to specify for the <code>columns</code> parameter of the <code>constraints</code> <code>table.PrimaryKey()</code> call.  I would like columns <code>TagValueID</code>, and <code>Identifier</code> to form the composite key.  </p>
  
  <p>What do I need to specify for the <code>columns</code> parameter?</p>