title: SQLiteConnection Query
body: <p>I'm trying to select data from Database using SQLiteConnection. It's an UWP application.</p>
  
  <pre><code>public class ResumeModel
  {
      public List&lt;User&gt; Users { get; set; } = new List&lt;User&gt;();
  
      public ResumeModel()
      {
          using (var connection = new SQLiteConnection(new SQLite.Net.Platform.WinRT.SQLitePlatformWinRT(), App.path))
          {
              try
              {
                  object query = connection.Query&lt;User&gt;("Select * From User", null);
                  if(query != null)
                  {
                      Users = (List &lt;User&gt;) query;
                  }
              } catch(Exception ex)
              {
                  Debug.Write(ex.ToString());
              }
          }
      }
  }
  </code></pre>
  
  <p>I'm getting the exception: "Object reference not set to an instance of an object"</p>
  
  <p>Here is my User class:</p>
  
  <pre><code>public class User
  {
      [SQLite.Net.Attributes.PrimaryKey, SQLite.Net.Attributes.AutoIncrement]
      public int userID { get; set; }
      public String username { get; set; }
  
      public User()
      { }
  
      public User(int userID, string name)
      {
          this.userID = userID;
          this.username = name;
      }
  }
  </code></pre>
  
  <p>Does anyone know what I'm doing wrong?</p>
  
  <p>Thanks</p>