user1349354
user1349354

Reputation:

Call Method in Linq Queries

I Use KendoUI Grid and I have a code like this :

 IQueryable<ListStatus> liststatus = (from karfarmalist in db.PTStbLists
 join eventlist in db.PTStbListEvents on karfarmalist.Id equals eventlist.SerialList 
 join combobase in db.GlbTbComboBases on eventlist.EventType equals combobase.GUID
 where karfarmalist.TFN.Equals(tfn) && karfarmalist.GuidList == listid
 select new ListStatus{
                       id = eventlist.Id,
                       eventdate = Farab.Utility.PersianDate.Georgian_jalali(eventlist.EventDate),
                       status = combobase.FAName
                      }).OrderBy(l => l.id);

Farab Call Raise an error. I use AsEnumerable method but orderby has error. How can I call that method in LINQ without error?

Upvotes: 0

Views: 117

Answers (1)

Y2theZ
Y2theZ

Reputation: 10412

You can add .ToList() at the end of the query but that would cause a call to be made to the db, which will affect performance of the query. Not sure if this is what you want but you can give it a try.

Upvotes: 1

Related Questions