I have a couple of reliable collections across different stateful services. I need to access one reliable collection from another stateful service (e.g. Employees collection from Department stateful service).
Although the Employees collection is populated with data, when I try to get a reference to the collection
var myDictionary = await this.StateManager.GetOrAddAsync>("employees");
var allEmployees = await mydictionary.CreateEnumerableAsync(tx, EnumerationMode.Unordered)
var enum = allEmployees.GetAsyncEnumerator()
the enumeration count on allEmployees collection returns count of 0.
The same approach works correctly when I try to access the employees in Employee collection in the Employee stateful service.
This doesnt work when I try to access the employees in Employee collection in the Department stateful service.
Is this a correct way to access data across collections? If not what is the correct way?