title: Which project template to choose if I want a seperate web api, yet still run server-side and later to client-side?
body: <p>When one creates a ASP.NET Core project using Blazor, this presents some interesting architecture decisions.  There are 3 different project templates.<br/>
  - Blazor<br/>
  - Blazor (ASP.NET Core hosted) <br/>
  - Blazor (Server-side in ASP.NET Core)<br/></p>
  
  <p><strong>Question 1</strong><br/>
  I'm trying to understand the purpose or benefit of the "Blazor (Server-side in ASP.NET Core) " template or approach to structuring a project.  Why have a .NET core app serve up another .NET core app ?  Or am I missing something?
  Given the different hosting models explained here.<br>
  <a href="https://blazor.net/docs/host-and-deploy/hosting-models.html" rel="nofollow noreferrer">https://blazor.net/docs/host-and-deploy/hosting-models.html</a><br/>
  Couldn't this simply be one project that uses server-side Blazor rather than 2?
  <br/><br/>
  <strong>Question 2</strong><br/>
  If I am looking at architecture like that shown in the image below, shouldn't I start with the "ASP.NET Core Hosted" template, then change the .Client project to use the "server-side" framework?  That way, I still have a callable api that can be accessed from another app if needed?  Or I suppose I can still use the "Server-side" template, which would pre-set all the startup plumbing for firing up the Client with the server-side hosting model, and combine this with adding my own API controllers to the .Server project, which would be called via the business rules library as per the diagram.</p>
  
  <p><strong>Question 3</strong><br/>
  At some point, I might want to switch the .Client app to use webassembly when the tooling/debugging support becomes better.  I don't think the architecture I'm suggesting prohibits that?  I would just change out the startup code in the .Server app, replace the reference to blazor.server.js with the blazor.webassembly.js and a few other things and I should be golden.  Am I off base here?</p>
  
  <p>Notes on architecture:<br/>
  - Client app needs access to a resource via some CRUD operation, so it makes a call into a method in the Business Rules class library<br/>
  - Business rules library references a class library that contains "dumb" POCO classes that represent various domain models. Makes a call to an api <br/>
  - API controller/action then calls a Data library or repository that manages a Entity Framework DbContext for fetching/updating the data in the Db<br/>
  - Both the Business rules library, the Data library and the API all reference the "Models" library.</p>
  
  <p><a href="https://i.stack.imgur.com/xVO8F.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xVO8F.png" alt="enter image description here"></a></p>