mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-10 17:28:27 -04:00
21 lines
649 B
C#
21 lines
649 B
C#
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using NadekoBot.Core.Services.Database.Models;
|
|
|
|
namespace NadekoBot.Core.Services.Database
|
|
{
|
|
public static class CurrencyTransactionExtensions
|
|
{
|
|
public static List<CurrencyTransaction> GetPageFor(this DbSet<CurrencyTransaction> set, ulong userId, int page)
|
|
{
|
|
return set.AsQueryable()
|
|
.AsNoTracking()
|
|
.Where(x => x.UserId == userId)
|
|
.OrderByDescending(x => x.DateAdded)
|
|
.Skip(15 * page)
|
|
.Take(15)
|
|
.ToList();
|
|
}
|
|
}
|
|
} |