Take example:
var project = new Project();
var personA = new Person(project);
var personB = new Person(project);
using (var tx = StateManager.CreateTransaction())
{
await myDictionary.AddAsync(tx, personA.Id, personA);
await myDictionary.AddAsync(tx, personB.Id, personB);
await tx.CommitAsync();
}
using (var tx = StateManager.CreateTransaction())
{
await myDictionary.TryRemoveAsync(tx, personA.Id);
await tx.CommitAsync();
}
My assumption: Removal of personA from the collection doesn't affect personB's persisted state or current in-memory state even though they shared reference to same Project object? Objects in this case are immutable as is recommended.
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
Thanks for the question! We are investigating and will update you shortly.
@aljo-microsoft to confirm
@juho-hanhimaki just FYI, I am still working to confirm this. I should have an answer this week.
@juho-hanhimaki well it took a while, but after discussing this with the Service Product team if the objects are immutable as recommended then your assumption is correct and you should have no issues :)
Thanks a ton!