I have an asp.NET
application where I use a LinqDataSource
control to fill a ListView
control. Here's the code for my LinqDataSource
control's OnSelecting
command:
protected void lds_Selecting(object sender, LinqDataSourceSelectEvenArgs e)
{
var db = new Models.EF.Entities();
e.Result = from x in db.Sliders
where x.IsPublic == true
select x;
}
This works great but now I want to run an if statement in the case that the result is empty. How can I see if the result is empty?