title: Entity Framework: Composite Foreign Key on unique (not primary keys) parent fields
body: <p>I have a table that needs to be bound to another table by its <code>Id</code> column, and to the third table by its <code>(Id, Code)</code> columns. I can easily do in in <em>SQL Server</em> using both a primary key and a unique index, but have no idea how to implement it in <em>Entity Framework</em>. </p>
  
  <p>If I put <code>[Key]</code> attribute on both columns then I'm unable to create a first relationship. </p>
  
  <p>Otherwise, if I only apply one <code>[Key]</code> then I cannot make second relationship.  </p>
  
  <p>Is there any workaround?  </p>