mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-21 05:53:33 -07:00
Added some tests for PagingSpecExtensions
Allow specials in missing Dropped ListSortDirection
This commit is contained in:
parent
d37c8c26c2
commit
f4dd6adc6a
12 changed files with 131 additions and 92 deletions
|
@ -20,6 +20,13 @@ namespace NzbDrone.Core.Datastore
|
|||
return (pagingSpec.Page - 1)*pagingSpec.PageSize;
|
||||
}
|
||||
|
||||
public static Marr.Data.QGen.SortDirection ToSortDirection<TModel>(this PagingSpec<TModel> pagingSpec)
|
||||
{
|
||||
if (pagingSpec.SortDirection == SortDirection.Descending) return Marr.Data.QGen.SortDirection.Desc;
|
||||
|
||||
return Marr.Data.QGen.SortDirection.Asc;
|
||||
}
|
||||
|
||||
private static Expression<Func<TModel, object>> CreateExpression<TModel>(string propertyName)
|
||||
{
|
||||
Type type = typeof(TModel);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue