var result = repository.visitsearch(datefrom, dateto, CountryID).OrderByDescending(d => d.VisitDate).ToList();
which calls the following repository.visitsearch method:-
public IQueryable<VisitSearch> visitsearch(DateTime? datefrom, DateTime? dateto, int countryid)
{
var vs = (from v in entities.Visits
//code goes here....
return vs;
My question is :- will the OrderByDescending(d => d.VisitDate) on my action method be executed on the database level OR in the application server???
johnjohn1231...
Participant
922 Points
871 Posts
Will the OrderBY for an IQuerable be executed in the Database or in the application server
May 10, 2012 10:11 PM|LINK
i have the following on my action method:-
which calls the following repository.visitsearch method:-
public IQueryable<VisitSearch> visitsearch(DateTime? datefrom, DateTime? dateto, int countryid) { var vs = (from v in entities.Visits //code goes here.... return vs;My question is :- will the OrderByDescending(d => d.VisitDate) on my action method be executed on the database level OR in the application server???
BR
ignatandrei
All-Star
134913 Points
21619 Posts
Moderator
MVP
Re: Will the OrderBY for an IQuerable be executed in the Database or in the application server
May 10, 2012 10:19 PM|LINK
Database.