Open mkArtakMSFT opened 1 year ago
I am very interested in this. I have created a pattern that lets me do this constrained by the current APIs. I made a video about it here. https://www.youtube.com/watch?v=PsmXZnvWfIo
yes the hole idea of blazor server is we can code the backend and frontend in one single project without need to create backend with webapi and then make request from blazor server to webapi , blazor server is solved that problem . but in .net 8 we have the auto render mode which is not actually make benefit for me because this mode require to use webapi . so i'm stick with blazor interactive server, but we can make blazor more more powerful, if we can have one blazor project that we can code backend and we can use Auto render mode with it, To achieve this there is a suggestion in my mind: 1- every method in . razor will be shared for wasm (client), and interactive server mode. 2-if any method have [ServerOnly] attribute in . razor it will be in server only and to get access to this method from wasm(client) we need generate this method as endpoint and get access to it (this can achieve by webapi or signalr) if you guys choose signalR then make the signalR if its lost the cirecit then create new one automatically without need to refresh the website (because its for endpoints only and will not effect the state of blazor). I hope something similar to this will be done in .net 9.
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.
@mkArtakMSFT This doesn't seem to have been touched in a while, is there any plans to look at this for the .NET 10 cycle? This feels like the last step to making Blazor Web Apps really nice from a DX perspective. Data access feels cumbersome to implement when using multiple render modes.
With .NET running on both ends of the wire in a Blazor app, we have the opportunity to dramatically simplify data access with a strongly typed programming model. This issue tracks exploring adding a streamlined programming model for loading and manipulating data from the client.