SHARE
TWEET

Untitled

a guest Feb 14th, 2020 84 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public static async Task<List<T>> GetLimitAsync<T>(Expression<Func<T, bool>> predicate, uint limit, Expression<Func<T, bool>> selector = null, bool orderByDescending = false) where T : class, IKaguyaQueryable<T> {
  2. using (var db = new KaguyaDb()) {
  3. var baseQuery = (from t in db.GetTable<T>().Where(predicate)
  4. select t);
  5. if(selector != null) {
  6. ..
  7. baseQuery = baseQuery.OrderBy..
  8. }
  9. return await baseQuery.ToListAsync();
  10. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top