The letter S in a light blue, stylized speech bubble followed by SpeakBits
SpeakBitsThe letter S in a light blue, stylized speech bubble followed by SpeakBits
Trending
Top
New
Controversial
Search
Groups

Enjoying SpeakBits?

Support the development of it by donating to Patreon or Ko-Fi.
About
Rules
Terms
Privacy
EULA
Cookies
Blog
Have feedback? We'd love to hear it!

How to Add a Blazor Server App to an ASP.NET Model/Controller Web API

danschnau.com
submitted
7 mos ago
bykaiserseahorsetoprogramming

Summary

This is the first of a series of posts on how to use the C# programming language to create web apps. The next post will focus on how the C programming language can be used to build apps.

Program.cs provides a sample Model object for us to work with. The blazorserver.json and appsettings.Development.json are configuration files for application settings.

After removing broken dependencies from the FetchData.razor page, we have an app that runs, but the F fetchData page doesn't do anything. We're going to change this code to use our Web API controller instead.

This article provides a step-by-step guide to combining Blazor Server with an ASP.NET Web API. It ensures seamless data integration and a functional web application.

 web site website internet site site menu oscilloscope scope cathode-ray oscilloscope CRO screen CRT screen-0
22

7 Comments

3
justadev
7 mos ago
How is this performance over something like go?
2
kaiserseahorseOP
7 mos ago
The tough part is that blazor renders a lot server side and might do too much if you get an app with a large amount of users
2
justadev
7 mos ago
Ah so the age old who pays for the rendering question
2
kaiserseahorseOP
7 mos ago
Bit of an oversimplification but yes!
2
throwschen
7 mos ago
How does this fit with dotnet core?
1
kaiserseahorseOP
7 mos ago
Same thing. It can be added well to it
2
throwschen
7 mos ago
Might need to look back into this then