Dears ;
I'm facing this problem ,Please help
`public class GetCardListInput: IPagedResultRequest, ISortedResultRequest
{
public int SkipCount { get; set; }
public int MaxResultCount { get; set; }
public string Sorting { get; set; }
}`
`public async Task
{
var cardsCount = 0;
if (input.MaxResultCount <= 0)
{
input.MaxResultCount = SettingManager.GetSettingValue<int>(MySettingProvider.CardsDefaultPageSize);
}
cardsCount = await _cardRepository.CountAsync();
var cards = await _cardRepository
.GetAll()
.OrderBy(input.Sorting)
.PageBy(input)
.ToListAsync();
return new PagedResultDto<CardListDto>(cardsCount, cards.MapTo<List<CardListDto>>());
}`
then i got this error
The type arguments for method 'Queryable.OrderBy<TSource, TKey>(IQueryable<TSource>, Expression<Func<TSource, TKey>>)' cannot be inferred from the usage.
Thanx alot;
I found the issue
add using System.Linq.Dynamic;
Most helpful comment
I found the issue
add
using System.Linq.Dynamic;