Tried it. Doesn’t seem feasible. However you try to put realm code behind an AsyncContext, you still would like to use the RealmObjects in Razor components. But you can’t since these can be rendered using any thread. Thus I would have to move every RealmObject to own models, and that’s not desirable or effective.
To bad really. Blazor Server is stateful on the server pr. connection. So I was looking forward to see sessions react to data changes, tell the client via SignalR and see the SPA page change.
The only thing I can think of now, is to encapsulate the realm API behind a gRPC server, open a stream and receive changes that way. I suppose I don’t even need Realm Cloud for that