diff --git a/src/abstractions/store/InMemoryBackingStore.cs b/src/abstractions/store/InMemoryBackingStore.cs index 423f3831..e5bd1f3a 100644 --- a/src/abstractions/store/InMemoryBackingStore.cs +++ b/src/abstractions/store/InMemoryBackingStore.cs @@ -206,11 +206,11 @@ private void EnsureCollectionPropertyIsConsistent(string key, object? storeItem) // Call Get<>() on nested properties so that this method may be called recursively to ensure collections are consistent foreach(var item in collectionTuple.Item1) { - if(item is IBackedModel store) + if(item is IBackedModel backedModel) { - foreach(var innerItem in store.BackingStore.Enumerate()) + foreach(var innerItem in backedModel.BackingStore.Enumerate()) { - store.BackingStore.Get(innerItem.Key); + backedModel.BackingStore.Get(innerItem.Key); } } }