score:4

Accepted answer

i got the solution, what i need to do is to use "asenumerable()", here is the resolved version of my linq-

 var srs = (from s in dcdistrict.scheduledreportstatus.asenumerable()
                                         where s.reportconfigid.equals(configid)
                                         && s.status.hasvalue && s.status.value
                                         && (convert.tostring(s.sentdate).split(' ')[0]).equals(convert.tostring(datetime.now.date).split(' ')[0])
                                         select s).firstordefault();

asenumerable() done some part of the code client side that resolves my issue.

score:2

filter as much as you can on the server and then, what you can't on the client.

var startdate = new datetime(datetime.today.year, 1, 1);
var enddate = startdate.addyears(1);
var serverquery = from s in dcdistrict.scheduledreportstatus
    where s.sentdate >= startdate && s.sentdate < enddate
        && s.reportconfigid.equals(configid)
        && s.status.hasvalue && s.status.value
    select s;
var clientquery = from s in serverquery
    where // whatever client side filtering
    select s;

Related Query