Hi! I have a simple question regarding performance as I've seen this situtation happen before and just wanted to make sure. When we use GetAll, from IRepository, and then filter results... is the whole table fetched from the table and then filtered or is it filtered before fetching to database? Thanks in advance.
I had a look at the sql generated using SQL Profiler and in both the following cases the WHERE clause was added limiting the rows fetched from the table.
_myRepository .GetAll() .Where(e => e.AssetId == input.AssetId && e.StartTime >= input.StartTime) .WhereIf(input.EndTime.HasValue, e => e.EndTime <= input.EndTime)
_myRepository .GetAllList((a => a.Core.IsActive == true && a.Core.ApplicationId == input.ApplicationId));