diff --git a/src/Connected.Entities/Caching/EntityCacheClient.cs b/src/Connected.Entities/Caching/EntityCacheClient.cs index 9b20564..36dea51 100644 --- a/src/Connected.Entities/Caching/EntityCacheClient.cs +++ b/src/Connected.Entities/Caching/EntityCacheClient.cs @@ -82,7 +82,9 @@ public abstract class EntityCacheClient : StatefulCacheCli if (context.GetService() is not IStorageProvider provider) return default; - var entities = provider.Open().AsEntities(); + var entities = await provider.Open().AsEntities(); + + var entity = entities.FirstOrDefault(e => e.Id.Equals(id)); return await (from dc in provider.Open() where TypeComparer.Compare(dc.Id, id)