var log = string.isnullorempty(filter?.search) ? _applog.get().orderbydescending(x => x.date) : _applog.get().where(p => p.processname == filter.search).orderbydescending(x => x.date); log = pagination(log.asqueryable(), filter, "date", "loglist");
the error @ pagination, when log.asqueryable() try convert iorderedqueryable iqueryable
cannot implicitly convert type iqueryable iorderedqueryable
someone know how can alternative way ?
i think problem here pagination()
returns iqueryable<t>
, assigning result log
iorderedqueryable<t>
(since both parts of conditional operation ordered). fortunately, looks aren't using ordered part, can presumably change log
om first time explicitly iqueryable<t>
rather var
(which picking iorderedqueryable<t>
):
iqueryable<whatever> log = ...
alternatively, use different variable result:
var query = ... var log = pagination(query, filter, "date", "loglist");
Comments
Post a Comment