title: Why does primary key order matter?
body: <p>I recently set up a class in an EntityFramework project which designated a couple of its members as a composite key.</p>
  
  <p>However, when it came to time to create the database from this it gave the error</p>
  
  <blockquote>
    <p>Unable to determine composite primary key ordering for type 'NNNNN'. Use the ColumnAttribute or the HasKey method to specify an order for composite primary keys.</p>
  </blockquote>
  
  <p>I know how to solve the problem, but I was just wondering why it cares about the order. Isn't a composite primary key just a set of columns on which to key the records, without any particular ordering necessary?</p>