[WIP] Add additional check to entities list

features/nuget_autobuild
Matija Koželj 2 years ago
parent 018a48dd65
commit ed9f31df1f

@ -82,7 +82,9 @@ public abstract class EntityCacheClient<TEntity, TPrimaryKey> : StatefulCacheCli
if (context.GetService<IStorageProvider>() is not IStorageProvider provider) if (context.GetService<IStorageProvider>() is not IStorageProvider provider)
return default; return default;
var entities = provider.Open<TEntity>().AsEntities(); var entities = await provider.Open<TEntity>().AsEntities();
var entity = entities.FirstOrDefault(e => e.Id.Equals(id));
return await (from dc in provider.Open<TEntity>() return await (from dc in provider.Open<TEntity>()
where TypeComparer.Compare(dc.Id, id) where TypeComparer.Compare(dc.Id, id)

Loading…
Cancel
Save