mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-10 17:28:27 -04:00
Small refactoring. Finally made use of the type parameter in NadekoTypeReader<T> class
This commit is contained in:
@@ -9,7 +9,7 @@ public static class MusicPlaylistExtensions
|
||||
public static List<MusicPlaylist> GetPlaylistsOnPage(this DbSet<MusicPlaylist> playlists, int num)
|
||||
{
|
||||
if (num < 1)
|
||||
throw new IndexOutOfRangeException();
|
||||
throw new ArgumentOutOfRangeException(nameof(num));
|
||||
|
||||
return playlists.AsQueryable().Skip((num - 1) * 20).Take(20).Include(pl => pl.Songs).ToList();
|
||||
}
|
||||
|
Reference in New Issue
Block a user