I'm loading a query in a Silverlight application and have figured out how to return only today's records:
var latestData = from w in this._weatherDataContext.GetWeatherDatasQuery()
where w.date.Day == DateTime.Today.Day
select w;
try
{
loadOp = this._weatherDataContext.Load(latestData);
}
catch (Exception Ex)
{
//textBlock1.Text = Ex.Message;
}
loadOp.Completed += new EventHandler(loadOp_Completed);
}
void loadOp_Completed(object sender, EventArgs e)
{
this.DataContext = loadOp.Entities;
}
Any ideas how I could edit the where clause to return records from today but in the last ten minutes only? Obviously at the moment I receive every record with today's date (the database adds a new record every minute)
Many thanks

New Topic/Question
Reply




MultiQuote



|