title: LiteDB multiple queries in C#
body: <p>I am new to <strong>LiteDB</strong> and would like to execute two or more queries in one go. </p>
  
  <p>I want to be able to search for a certain customer in my DataBase and since there will be multiple customers with a similar name I want return all of them and sort them in <strong>Descending (Id or Date) Order</strong>. I have both functions improvised but separated, so I'm looking for a way to <em>combine Search and Sort</em> into <strong>one Query</strong>.</p>
  
  <p>Here is the main search function:</p>
  
  <pre><code>private void search_btn_Click(object sender, RoutedEventArgs e)
      {
          using (var dataBase = new LiteDatabase(dbConnectionString))
          {
              // Stranka = Customer
              var collection = dataBase.GetCollection&lt;Stranka&gt;("stranka");
              // Search for a customer name whom I enter in the searchName_tb
              var query = collection.Find(Query.Where("Ime_Priimek", 
              x =&gt; x.AsString.Contains(searchName_tb.Text)));
  
              // Currently I'm doing everything with ListView, so I clear it
              // to make room for resulting data to be shown
              lvStranke.Items.Clear();
  
              foreach (var customer in query)
              {                 
                  lvStranke.Items.Add(customer);
              }
          }
      }
  </code></pre>
  
  <p>Here is my version of sorting in descending order when they get loaded/refreshed:</p>
  
  <pre><code>    public void LiteDB_ShowAll()
      {
          using (var dataBase = new LiteDatabase(dbConnectionString))
          {
              var collection = dataBase.GetCollection&lt;Stranka&gt;("stranka");
              lvStranke.Items.Clear();
  
              var count = collection.Count(Query.All());
              // From last ID to first (Descending)
              for (int i = count; i &gt;= 1; i--)
              {
                  lvStranke.Items.Add(collection.FindById(i));
              }               
          }         
      }
  </code></pre>