From 54961cdf22a0c39754c06bf97b9d661b34d04fdc Mon Sep 17 00:00:00 2001 From: Gary Sharp Date: Mon, 6 May 2013 19:09:04 +1000 Subject: [PATCH] Fix: EDM -> Cast<>; Retrieve items first --- Disco.Web/Areas/Config/Models/DeviceBatch/IndexModel.cs | 2 +- Disco.Web/Areas/Config/Models/DeviceProfile/IndexModel.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Disco.Web/Areas/Config/Models/DeviceBatch/IndexModel.cs b/Disco.Web/Areas/Config/Models/DeviceBatch/IndexModel.cs index 45b0fc80..49d2147d 100644 --- a/Disco.Web/Areas/Config/Models/DeviceBatch/IndexModel.cs +++ b/Disco.Web/Areas/Config/Models/DeviceBatch/IndexModel.cs @@ -26,7 +26,7 @@ namespace Disco.Web.Areas.Config.Models.DeviceBatch WarrantyExpires = db.WarrantyValidUntil, InsuranceSupplier = db.InsuranceSupplier, InsuredUntil = db.InsuredUntil - }).Cast().ToList(); + }).ToArray().Cast().ToList(); return m; } diff --git a/Disco.Web/Areas/Config/Models/DeviceProfile/IndexModel.cs b/Disco.Web/Areas/Config/Models/DeviceProfile/IndexModel.cs index c6924cc3..dd749253 100644 --- a/Disco.Web/Areas/Config/Models/DeviceProfile/IndexModel.cs +++ b/Disco.Web/Areas/Config/Models/DeviceProfile/IndexModel.cs @@ -25,7 +25,7 @@ namespace Disco.Web.Areas.Config.Models.DeviceProfile DistributionTypeId = dp.DistributionTypeDb, DeviceCount = dp.Devices.Count, DeviceDecommissionedCount = dp.Devices.Count(d => d.DecommissionedDate.HasValue) - }).Cast().ToList(); + }).ToArray().Cast().ToList(); if (DiscoApplication.MultiSiteMode) {