diff --git a/src/Artemis.Storage/Repositories/DeviceRepository.cs b/src/Artemis.Storage/Repositories/DeviceRepository.cs index 2eb7098c2..af3935161 100644 --- a/src/Artemis.Storage/Repositories/DeviceRepository.cs +++ b/src/Artemis.Storage/Repositories/DeviceRepository.cs @@ -31,7 +31,7 @@ internal class DeviceRepository(Func getContext) : IDeviceRepo public IEnumerable GetAll() { using ArtemisDbContext dbContext = getContext(); - return dbContext.Devices; + return dbContext.Devices.AsEnumerable(); } public void Save(DeviceEntity deviceEntity) diff --git a/src/Artemis.Storage/Repositories/EntryRepository.cs b/src/Artemis.Storage/Repositories/EntryRepository.cs index a901e637d..52bb8df7b 100644 --- a/src/Artemis.Storage/Repositories/EntryRepository.cs +++ b/src/Artemis.Storage/Repositories/EntryRepository.cs @@ -37,7 +37,7 @@ internal class EntryRepository(Func getContext) : IEntryReposi public IEnumerable GetAll() { using ArtemisDbContext dbContext = getContext(); - return dbContext.Entries; + return dbContext.Entries.AsEnumerable(); } public void Save(EntryEntity entryEntity) diff --git a/src/Artemis.Storage/Repositories/Interfaces/IProfileCategoryRepository.cs b/src/Artemis.Storage/Repositories/Interfaces/IProfileCategoryRepository.cs index 533e8990e..f2cb69f17 100644 --- a/src/Artemis.Storage/Repositories/Interfaces/IProfileCategoryRepository.cs +++ b/src/Artemis.Storage/Repositories/Interfaces/IProfileCategoryRepository.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using System.IO; using Artemis.Storage.Entities.Profile; namespace Artemis.Storage.Repositories.Interfaces; @@ -9,7 +8,7 @@ public interface IProfileCategoryRepository : IRepository { void Add(ProfileCategoryEntity profileCategoryEntity); void Remove(ProfileCategoryEntity profileCategoryEntity); - List GetAll(); + IEnumerable GetAll(); ProfileCategoryEntity? Get(Guid id); bool IsUnique(string name, Guid? id); void Save(ProfileCategoryEntity profileCategoryEntity); diff --git a/src/Artemis.Storage/Repositories/ProfileCategoryRepository.cs b/src/Artemis.Storage/Repositories/ProfileCategoryRepository.cs index 90e53c731..e1e58559e 100644 --- a/src/Artemis.Storage/Repositories/ProfileCategoryRepository.cs +++ b/src/Artemis.Storage/Repositories/ProfileCategoryRepository.cs @@ -25,7 +25,7 @@ internal class ProfileCategoryRepository(Func getContext, IPro dbContext.SaveChanges(); } - public List GetAll() + public IEnumerable GetAll() { if (!_migratedProfiles) { @@ -34,7 +34,7 @@ internal class ProfileCategoryRepository(Func getContext, IPro } using ArtemisDbContext dbContext = getContext(); - return dbContext.ProfileCategories.Include(c => c.ProfileConfigurations).ToList(); + return dbContext.ProfileCategories.Include(c => c.ProfileConfigurations).AsEnumerable(); } public ProfileCategoryEntity? Get(Guid id)