Hi
how can I make the following linq statement to get maximum value of reading for the year and month and depot, Any help would be very appreciated
public long GetMaxMeterReading(int depotno, int year, int month) //
{
long maxRead = (from d in ctx.goMeterReading
where d.DepotNo == depotno && d.ReadingYear == year && d.ReadingMonth == month
select d.Reading).SingleOrDefault();
return maxRead;
}Regards
Pol