Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ----> I change the following code
- IQueryable<Trip> query = tripRepository.GetAll()
- .InInterval(fromDate, toDate, t => t.CREATE_DATE.Value)
- .Include(t => t.Events.Select(e => e.Driver.Missions))
- .Include(t => t.FirstLoading)
- .Include(t => t.LastDelivery)
- .Include(t => t.Missions.Select(m => m.Resources))
- .Include(t => t.Tasks.Select(ta => ta.Location))
- .Where(t => t.Events.Any());
- To this : --->
- IQueryable<Trip> query = tripRepository.GetAll()
- .InInterval(fromDate, toDate, t => t.CREATE_DATE.Value)
- .Include(t => t.Events.Select(e => e.Driver.Missions))
- .Include(t => t.FirstLoading)
- .Include(t => t.LastDelivery)
- .Include(t => t.Missions.Select(m => m.Resources))
- .Include(t => t.Tasks.Select(ta => ta.Location))
- .Where(t => t.Events.Any(e => e.TYPE_ID == (int)EBTEnum.EventType.activityStart || e.TYPE_ID == (int)EBTEnum.EventType.activityEnd));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement