From 97ae7e533d3b5e366f77ea468ee7651e2439043f Mon Sep 17 00:00:00 2001 From: Jonas Anker Rasmussen Date: Tue, 1 Oct 2019 21:20:49 +0200 Subject: [PATCH] Reverted back to lazy evaluation of GetByOrganization --- API/Data/Services/ShiftService.cs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/API/Data/Services/ShiftService.cs b/API/Data/Services/ShiftService.cs index 43fc157..e0f5e20 100644 --- a/API/Data/Services/ShiftService.cs +++ b/API/Data/Services/ShiftService.cs @@ -60,12 +60,7 @@ public IEnumerable GetByOrganization(string shortKey, DateTime from, Date /// public IEnumerable GetByOrganization(int id, DateTime from, DateTime to) { - var result = GetByOrganization(id).AsQueryable().Where(shift => shift.End >= from && shift.Start <= to); - if (result == null) - { - return new List(); - } - return result.ToList(); + return GetByOrganization(id).AsQueryable().Where(shift => shift.End >= from && shift.Start <= to); } ///