title: ASP.NET MVC Code first: Multiplicity is not valid in Role in relationship
body: <p>I have a simple relationship. A campaign is linked to two Pages. A page can only be linked to one campaign. But I keep running into this error:</p>
  
  <blockquote>
    <p>System.Data.Edm.EdmAssociationEnd: : Multiplicity is not valid in Role
    'Page_Campaign_Source' in relationship 'Page_Campaign'. Because the
    Dependent Role properties are not the key properties, the upper bound
    of the multiplicity of the Dependent Role must be '*'.</p>
  </blockquote>
  
  <p>I went looking through some example codes and tutorials while comparing it to my code but I can't find a mistake.</p>
  
  <pre><code> public class Campaign
      {
          [Key()]
          public int Campaignid { get; set; }
          public string Name { get; set; }
  
          public virtual Page LandingPage { get; set; }
          public virtual RedeemPage RedeemPage { get; set; }
      }
  
  
  public class Page
  {
      [Key()]
      public int PageContentId { get; set; }
      public string Logo { get; set; }
      public string Css { get; set; }
  
      [ForeignKey("Campaign")]
      public int campaignID { get; set; }
      public virtual Campaign Campaign { get; set; }
  }
  </code></pre>
  
  <hr>
  
  <h2>Edit</h2>
  
  <p>Followed Eranga's reply and used the Fluent API instead but now I'm getting:</p>
  
  <blockquote>
    <p>An error occurred while saving entities that do not expose foreign key
    properties for their relationships</p>
  </blockquote>