Skip to content

Instantly share code, notes, and snippets.

@Geertvdc
Last active May 17, 2016 13:36
Show Gist options
  • Save Geertvdc/935da17d7be4ef418ce412a0b60a29b8 to your computer and use it in GitHub Desktop.
Save Geertvdc/935da17d7be4ef418ce412a0b60a29b8 to your computer and use it in GitHub Desktop.
//Realm sample queries
var realmOrders = _realm.All<RealmOrder>().Where(o => o.Price >= 900).ToList();
var realmOrderLines = _realm.All<RealmOrderLine>().Where(l => l.Amount == 2).ToList();
//Sqlite generic query
public async Task<List<T>> Query<T>(Expression<Func<T,bool>> query) where T : class
{
return await sql.GetAllWithChildrenAsync<T>(query);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment