title: Entity Framework error: The ForeignKeyAttribute on property is not valid
body: <p>I receive error then trying to add AgendaType to database context:</p>
  
  <blockquote>
    <p>An unhandled exception of type 'System.InvalidOperationException' occurred in EntityFramework.dll
    Additional information: The ForeignKeyAttribute on property 'AgendaType' on type 'MyDb.Agendum' is not valid. The foreign key name 'FK_Agenda_AgendaType' was not found on the dependent type 'MyDb.Agendum'. The Name value should be a comma separated list of foreign key property names.</p>
  </blockquote>
  
  <pre><code>[Table("AgendaType")]
  public partial class AgendaType
  {
      [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
      public AgendaType()
      {
          Agenda = new HashSet&lt;Agendum&gt;();
      }
  
      [Key]
      [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
      public int Id { get; set; }
  
      [Required]
      [StringLength(2)]
      [Index("IX_AgendaType_Code", 1, IsUnique = true)]
      public string Code { get; set; }
  
      [Required]
      [StringLength(50)]
      public string Name { get; set; }
  
      [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
      public virtual ICollection&lt;Agendum&gt; Agenda { get; set; }
  }
  
  public partial class Agendum
  {
      [Key]
      [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
      public int Id { get; set; }
  
      public int AgendaTypeId { get; set; }
  
      [ForeignKey("FK_Agenda_AgendaType")]
      public virtual AgendaType AgendaType { get; set; }
  }
  </code></pre>
  
  <p>However I specified foreign key on property AgendaType, as in provided database scheme. What is incorrect?</p>