Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

In a Blazor Web App (Unified), can the Server project access EF Core directly, or is a separate Web API required?

$
0
0

I'm confused about the recommended architecture for Blazor Web App (Unified).

Blazor is often introduced as a frontend framework, similar to Angular or React, which usually means the frontend talks to a separate backend API. Because of that, I'm unsure whether I should treat Blazor the same way.

In a Blazor Web App (Unified) targeting .NET 8, the application can render components both on the server and in WebAssembly. I want to understand the technical constraints of this model:

  1. Is it technically supported for the server project to access the database directly using EF Core (without a separate Web API)?

  2. In which scenarios is a separate Web API required (e.g., WebAssembly-only components, external clients, deployment boundaries)?

  3. How does this differ from the older Blazor Server and Blazor WASM hosted models?

I am not asking which approach is "better", but which architectures are supported and what trade-offs exist in the unified model.

Most examples I find are either old Blazor Server or Blazor WASM hosted setups, so I'm not sure what applies to the new unified model.


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>