Develop/feature/td 5888 make lh able to host blazor#1314
Conversation
There was a problem hiding this comment.
The previous pr created public setting so dont worry what is added or lost its the bff end point that is relevant
There was a problem hiding this comment.
This is things being pulled into shared to support searchservice
There was a problem hiding this comment.
this is a new and temporary file i think, but needed to move it to support search
| { | ||
| using System.Collections.Generic; | ||
| using System.ComponentModel.DataAnnotations; | ||
| using Microsoft.AspNetCore.Mvc;//qqqq |
There was a problem hiding this comment.
this is a good example of how we can easily move aspnetcore.mvc it just moves to the presentation layer the controller uses it and it should work
There was a problem hiding this comment.
All this is, is just a little helper to tidy up the repittion of registering different clients that only differ by the appsettings end point value. ... this may end up being different anyway if we look at how we httpclients across top level of solution
| Logger.LogInformation($"Logger: Calling via the bff this api route: {ApiRoute}"); | ||
| Logger.LogInformation("📡 Target: {TargetUrl}", "https://lh-web.dev.local/bff/lh-api.dev.local/Catalogue/GetLatestCatalogueAccessRequest/500"); | ||
| // Assuming httpClient.BaseAddress is set | ||
| string fullUrl = new Uri(httpClient.BaseAddress, ApiRoute).ToString(); |
There was a problem hiding this comment.
the base address is the bff address followed by the name of the api we wish to hit
| /// <returns>The actionResult.</returns> | ||
| [HttpGet("results")] | ||
| public async Task<IActionResult> Index(SearchRequestViewModel search, bool noSortFilterError = false, bool emptyFeedbackError = false, bool filterApplied = false) | ||
| public async Task<IActionResult> Index([FromQuery] SearchRequestViewModel search, bool noSortFilterError = false, bool emptyFeedbackError = false, bool filterApplied = false) |
There was a problem hiding this comment.
this is how we move aspnet core out of the one service earlier into the presentation service
|
|
||
| <ItemGroup> | ||
| <!--For Blazor--> | ||
| <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.8" /> |
There was a problem hiding this comment.
this is how webui tells the client to buil the wasm
There was a problem hiding this comment.
this is how we make it an mvc project that can compile blazor
There was a problem hiding this comment.
dont worry about this, there is a nice logging component and we are stubbing it server side pretty much
15f02cf
into
Develop/Feature/TD-5829-5862-Shared-Architecture-and-BFF-2
NOT FOR PRODUCTION JUST TO SHARE APPROACH AND GET FEEDBACK
JIRA link
[TD-5888](https://hee-tis.atlassian.net/browse/TD-5888)
https://hee-tis.atlassian.net/wiki/spaces/TP/pages/4917985332/Some+notes+on+Blazor+and+LH+Architecture
https://hee-tis.atlassian.net/wiki/spaces/TP/pages/4939153413/LearningHub.Nhs.Shared
Description
Please ask questions, make suggestions and add feedback
Screenshots