title: List of foreign keys in Entity Framework Core using SQLite
body: <p>I want to implement Related Pages structure that one page have a list of other pages related to it. But I could't figure out if it is possible. Now I have the structure like this: </p>
  
  <pre><code>public class Page
  {
      public int ID { get; set; }
      public string UrlName { get; set; }
      public List&lt;RelatedPages&gt; RelPages1 { get; set; }
  }
  public class RelatedPages
  {
      public int ID { get; set; }
      public int PageID { get; set; }
      public Page Page { get; set; }
      // I would like this to be the list of related page IDs 
      public List&lt;int&gt; RelPagesID { get; set; }
      public List&lt;Page&gt; RelPages { get; set; }
  }
  </code></pre>
  
  <p>And here is OnModelCreating method in my DbContext:</p>
  
  <pre><code>protected override void OnModelCreating(ModelBuilder modelBuilder)
  {
              modelBuilder.Entity&lt;RelatedPages&gt;()
                          .HasOne(x =&gt; x.Page)
                          .WithMany(x =&gt; x.RelPages1)
                          .HasForeignKey(x =&gt; x.PageID);
  
  }
  </code></pre>