What is the best way to check IQueryable result set is null
An exception will be thrown if IQueryable yeilds no result. I use:
using System.Data.Entity; //for Async support in EFvar tQ = await _tableRepository.DisplayAll();try { return await tQ.ToListAsync(); }catch { return null; }
to trap the exception and return null; or an empty List if you prefer,
catch { return new List<Table>(); }