In .NET Asp Core Web App with Realm version 10.6.0 (but in previuos version too) GetInstanceAsync not refresh when other client change data and I call another Realm.GetInstanceAsync.
If I call refresh… it’s synch
var realm = await Realm.GetInstanceAsync(config);
realm.Refresh();
Notifications only work when your realm regularly refreshes. In the Main or UI thread of your application, realm refreshes happen automatically. On background threads, you need to handle this yourself by either calling Realm.Refresh() or installing a SynchronizationContext on the thread before opening the realm. The third-party library Nito.AsyncEx.Context provides a SynchronizationContext implementation and a convenient API to install it.
In a AspNet Core WebApp, in every method of controller I call this code to be sure I am in sync with other client before any query in realm:
var app = Realms.Sync.App.Create(new AppConfiguration(myappid));
var user = await app.LogInAsync(Credentials.Anonymous());
var config = new SyncConfiguration(mypartition, user);
var realm = await Realm.GetInstanceAsync(config);
realm.Refresh(); // if I don't call this not sync change of other client
.......
var list = realm.All<.....>.....
Realm.GetInstanceAsync is not enough for sync, I have to call Refresh()