C
C#12mo ago
Joch

Blazor Data/Fetch Request.

Hi all, Im new to blazor, i used to work in asp.net web api as backend, vue as front end via spa and asp net razor pages( I don't know that to call this it like a mvc web app) Just wondering if i need to use rest, even i can get the data using service or repository and inject to page or component? Also if i using this, how do i monitor data Request, like i used to monitor data via dev tools > network tab. Edit: im using blazor web app in .net 8. Many thanks guys.
5 Replies
Jimmacle
Jimmacle12mo ago
blazor wasm or server? wasm you can use a httpclient which ends up making requests through fetch anyway server there is no "request" to be made because the blazor C# code is already running on the server
Joch
JochOP12mo ago
Sorry i forgot to include the app type, im using web app using net 8.
Jimmacle
Jimmacle12mo ago
but is it blazor wasm or blazor server?
Joch
JochOP12mo ago
Based in ms article it said its combined. https://learn.microsoft.com/en-us/aspnet/core/release-notes/aspnetcore-8.0?view=aspnetcore-7.0#new-blazor-web-app-template But i think its it called hosting model i think, where a interface is inject to pages like @inject.
What's new in ASP.NET Core 8.0
Learn about the new features in ASP.NET Core 8.0.
Jimmacle
Jimmacle12mo ago
seems like it will depend how you do it on a per-component basis then

Did you find this page helpful?