title: SQL Lite Xamarin : Query
body: <p>I'm newbie in SQLite.</p>
  
  <p>I would like to query my SQLite database to get multiple rows.</p>
  
  <p>When I add a new item in my local database I call this method <code>Add</code>:</p>
  
  <pre><code>public bool Add&lt;T&gt;(string key, T value)
  {
      return this.Insert(new SQliteCacheTable(key, this.GetBytes(value))) == 1;
  }
  
  _simpleCache.Add("favorite_1", data1);
  _simpleCache.Add("favorite_2", data2);
  _simpleCache.Add("favorite_3", data2);
  </code></pre>
  
  <p>Then,</p>
  
  <p>I would like to retrieve from local database all entries where key starts with "favorite_"
  to returns all objects in the database which are "favorite" objects.</p>
  
  <p>I'm experienced in Linq, and I would like to do something like this:</p>
  
  <pre><code>IEnumerable&lt;Element&gt; = repository.Find((element) =&gt; element.Key.StartWith("favorite_"))
  </code></pre>
  
  <p>In the <code>SQLiteConnection</code> class there is a method like this:</p>
  
  <pre><code>SQLite.Net.SQLiteConnection.Find&lt;T&gt;(System.Linq.Expressions.Expression&lt;System.Func&lt;T,bool&gt;&gt;)
  </code></pre>
  
  <p>But I would like the same with in returns a collection <code>IEnumerable&lt;T&gt;</code>.</p>
  
  <p>Can you help me please?</p>
  
  <p>Thank you.</p>
  
  <p>Jool</p>