priyanka

priyanka

  • NA
  • 215
  • 124k

Sorttop 10 Record Based on date in descending order

Aug 1 2017 8:34 AM
var db = (from usr in entity.USER_MASTER
join usrlog in entity.USER_LOG
on usr.USER_ID equals usrlog.USER_ID
select new
{
SlNo = usrlog.SLNO,
UserId = usr.USER_ID,
UserNm = usr.USER_NM,
LogTime = usrlog.LOG_TIME,
LogDet = usrlog.LOG_DETAILS,
CreatedDt = usrlog.CREATED_DT

}).Take(10).ToList().OrderByDescending(usr=>usr.CreatedDt);
 
 I want to sort top 10 record based on date in descending wise,but it throws an error
The data source does not support server-side data paging.
 
Plz suggest,what i am doing wrong

Answers (1)