title: The value of 'X' is unknown when attempting to save changes
body: <p>The value of 'X' is unknown when attempting to save changes. This is because the property is also part of a foreign key for which the principal entity in the relationship is not known primary key.</p>
  <p>The field it is complaining about is not a foreign key, but it is part of a composite primary key. Changing the value of this field from 0 to for example 1 solves this problem. The key is defined by the [Key] attribute:</p>
  <pre><code>    [Key]
      public int ClientId { get; set; }
      [Key]
      public int SubClientId { get; set; }
  </code></pre>
  <p>What is going on?</p>