C#C
C#3y ago
Allan

Questions regarding Blazor (WASM, Server etc.)

Hello, I'm starting a tiny project and I wanted to explore the possibilities of Blazor. I have some questions about the different possible things with Blazor because there's something I don't understand properly between the client-side and server-side.

I first made a WASM Blazor app, so it seems everything is done client-side. I wanted to know how to make server-side treatments (such as Database requests):
  • Do I have to create my own controllers in the app?
  • When you inject Services within your page, is the code within the service executed server-side or client-side? Can you chose this behaviour?
Then, is it bad to make a WASM Blazor App if I'm going to make some things server-side? Should I instead make a Blazor Server app, or a Hosted WASM Blazor app?
Was this page helpful?