title: Xamarin Check If Column exist in DB Sqlite
body: <p>I want a simple and fast way to see if a specific name exists in a sqlite database in Xamarin. I tried too many ways like this but it either returns all true or all false.</p>
  
  <pre><code> public bool Check(string Name)
      {
          try
          {
              using (var connection = new SQLiteConnection(System.IO.Path.Combine(folder, "PictureDB_GM.db3")))
              {
                  if (connection.Query&lt;PictureDB&gt;("SELECT * FROM Person Where Name=?", Name) == null)
                      return true;
                  else
                      return false;
              }
          }
          catch (SQLiteException ex)
          {
              Log.Info("SQLiteEx", ex.Message);
              return false;
          }
      }
  </code></pre>
  
  <p>For now, I am using this:</p>
  
  <pre><code>        for (int y = 0; y &lt; lstSource.Count; y++)
          {
  
              if (lstSource[y].Name == view.Resources.GetResourceName(item.ImageResourceId))
              {
  
                  ImageService.Instance.LoadCompiledResource(view.Resources.GetText(Resource.Drawable.Truee)).Into(img_2);
  
                  break;
              }
              else
                  ImageService.Instance.LoadCompiledResource(view.Resources.GetText(Resource.Drawable.empty)).Into(img_2);
  
          }
  </code></pre>
  
  <p>It works fine with few entries, but it takes a long amount of time and makes the app buggy and starts crushing if the DB has more than 50 entries.</p>
  
  <p>So is there any clean way or a better way to do this ??</p>