title: Define composite primary key in Entity Framework
body: <p>I have a table which has no primary key defined. When adding this to my DataModel the tool generates the following message:</p>
  
  <blockquote>
    <p>Errors Found During Generation:<br>
    warning 6013: The table/view
    'CHARGE_DETAILS' does not have a primary key defined
    and no valid primary key could be inferred. This table/view has been
    excluded. To use the entity, you will need to review your schema, add
    the correct keys, and uncomment it.</p>
  </blockquote>
  
  <p>I cannot modify the table in any way - however I reckon I could construct a composite key from two columns in order to satisfy these requirements.</p>
  
  <p>However <a href="http://msdn.microsoft.com/en-us/library/bb399579.aspx" rel="nofollow">it appears</a> that within the <code>EntityType</code> element <code>Key</code> can only contain <strong>zero or one</strong> elements.</p>
  
  <p>So how would I instruct EF to treat two columns as a key?</p>