Apache
AspNetCore `net8.0` - Blazor {*CatchAll} route overrides MVC AdminController route
This is the page I would like to have work.
Then all my components would be at
/Components/ContentTypes/{nameof(ContentType)}.razor
, and inherit from CmsHostedComponentBase
that supplies access to the helper, and other injected tools, as standard.
But, using this, calls to /admin
result in the 404 component showing. MVC is ignored. I thought that catch-all routes were supposed to have lowest priority.3 replies
Migrating WSDL imports via ServiceDescriptionImporter from Framework to Core
The answer to this question is pretty much exactly what we are doing now, and need to move away from:
https://stackoverflow.com/questions/38482849/generating-proxy-class-from-wsdl-on-the-fly
34 replies
(Blazor) I'm having trouble accessing a variable inside a parent component.
The
Expanded
, and ExpandedChanged
parameters are the two halves of the two-way binding that you are setting up with @bind-Expanded
.
From what I understand from your explanation, you want to have a wider scope of access to the state of the Sidebar than you currently do. Are you persisting this value anywhere, i.e. as a cookie, or in local storage?
What you are describing is "State Management". This is a hot topic within any web stack, and there are many ways to achieve it. There are three main objectives with state management:
1. Setting the state
2. Getting the state
3. Persisting the state
You can use local storage to persist the state; bearing in mind that you don't have access to local storage until OnAfterRenderAsync
.
To get/set the state, you can use a CascadingValue
component that you then call in the children with [CascadingParameter]
.
AppStateProvider.razor
AppState.cs
DISCLAIMER: This is written in Discord, and is untested, there may be syntax errors.4 replies
CROSS APPLY within LINQ
I know it's the same code. It's that everywhere in the codebase uses method chaining, and we would like to keep it that way. I've solved it with method chaining by having a separate foreach loop after it's been enumerated, but there should be a way to do it properly. This seems like giving up. I would like to find a tool that can show the SQL above, as LINQ. Similar to how you can change between C#/VB/IL with dnSpy. LIke LinqPad, but in reverse.
6 replies