mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-10 09:18:27 -04:00
20 lines
575 B
C#
20 lines
575 B
C#
#nullable disable
|
|
using LinqToDB.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using NadekoBot.Services.Database.Models;
|
|
|
|
namespace NadekoBot.Db;
|
|
|
|
public static class CurrencyTransactionExtensions
|
|
{
|
|
public static Task<List<CurrencyTransaction>> GetPageFor(
|
|
this DbSet<CurrencyTransaction> set,
|
|
ulong userId,
|
|
int page)
|
|
=> set.ToLinqToDBTable()
|
|
.Where(x => x.UserId == userId)
|
|
.OrderByDescending(x => x.DateAdded)
|
|
.Skip(15 * page)
|
|
.Take(15)
|
|
.ToListAsyncLinqToDB();
|
|
} |