title: How to make SQLite foreign keys with SQLite.Net-PCL
body: <p>In UWP, I enjoy the benefits of using SQLite.Net-PCL, creating classes to be used in apps as ObservableCollections to bind to the GridView.  After including SQLiteNetExtensions to build a database with foreign keys, I've noticed that the foreign keys are not truly created when viewing the database in SQLite Maestro.  Indexes are created instead.  <strong>What is the benefit to using the SQLiteNetExtensions if it doesn't really create foreign keys?</strong></p>
  
  <p>Maybe foreign keys are not necessary (later in the app after the database is created) when querying with LAMDA expressions or LINQ.  <strong>If I executed queries to create tables with foreign keys without using SQLite.Net-PCL, can I still use SQLite.Net-PCL to continue to bind ObservableCollections to GridViews?</strong></p>
  
  <p>Example Database:</p>
  
  <pre><code>[Table("Book")]
  public class Book
  {
      [PrimaryKey, AutoIncrement, Column("ID")]
      public int ID { get; set; }
      [Column("Name")]
      public string Name { get; set; }
  
      [ManyToMany]
      public List&lt;Checkout&gt; Checkout { get; set; }
  }
  
  [Table("School")]
  public class School
  {
      [PrimaryKey, AutoIncrement, Column("ID")]
      public int ID { get; set; }
      [Column("Name")]
      public string Name { get; set; }
  
      [OneToMany]
      public List&lt;Student&gt; Student { get; set; }
      [ManyToMany]
      public List&lt;Checkout&gt; Checkout { get; set; }
  }
  
  [Table("Student")]
  public class Student
  {
      [PrimaryKey, AutoIncrement, Column("ID")]
      public int ID { get; set; }
      [Column("SchoolID"), ForeignKey(typeof(School))]
      public int SchoolID { get; set; }
      [Column("Name")]
      public string Name { get; set; }
  
      [ManyToOne]
      public School School { get; set; }
  }
  
  [Table("Checkout")]
  public class Checkout
  {
      [PrimaryKey, AutoIncrement, Column("ID")]
      public int ID { get; set; }
      [Column("SchoolID"), ForeignKey(typeof(School))]
      public int SchoolID { get; set; }
      [Column("BookID"), ForeignKey(typeof(Book))]
      public int BookID { get; set; }
  }
  </code></pre>
  
  <p>SQLite is new to me, and there are so many SQLite Nuget packages to choose from.  Tutorials are a couple of years old, so there may be something better out now.  Thanks in advance.</p>