Amos
✅ Blazor WASM - Dynamic Open Graph Protocol
I'm looking for a bit of help/suggestions with a dynamic OGP using Blazor WASM.
Since it's a SPA, I'm not exactly sure how to approach a more page/description dynamic OGP embed.
For example, if a user navigates and hotlinks a profile, I'd like the OGP embed to include the updated title page, and a more customised embed including their profile name and some more relevant information.
9 replies
✅ Blazor WASM - Dynamic Open Graph Protocol
I'm looking for a bit of help/suggestions with a dynamic OGP using Blazor WASM.
Since it's a SPA, I'm not exactly sure how to approach a more page/description dynamic OGP embed.
For example, if a user navigates and hotlinks a profile, I'd like the OGP embed to include the updated title page, and a more customised embed including their profile name and some more relevant information.
23 replies
❔ Blazor Hosted - Client datatable with large dataset
I have a table component (using MudBlazor) which accesses the server-side API endpoint and pulls (currently) around 130k records. As you can imagine, too much for a client. 🙂
I need help and examples if possible on how I can implement client/server table pagination.
Any help is appreciated, thanks!
https://mudblazor.com/components/table#server-side-filtering,-sorting-and-pagination
(I followed this, but I don't quite understand its implementation for server-side, it seems all client-side to me.)
19 replies
✅ EFCore Nullability and Circular References
I have 2 tables which have FK's to each other due to the relationship.
I'm trying to add some seed data for a profile that needs to be created on initialisation.
I've tried two ways...
1. I'm getting an SQL 19 error which is a expected field that isn't provided (NULL). If I set the FK in EFAlias to Nullable with
?
, then the field in the database isn't populated (which makes sense). However, with the above scenario if I ever lookup the seeded user from their EFAlias, FK to EFUser isn't populated. So it's not possible.
2. If I remove the Nullable statement in the property and provide the UserId and AliasId in the seed data, the migration fails due to Circular Reference (which again, makes sense)
Is there a way I can both have each field populated and required (not nullable)?
Prefixed tables with EF just to make it a little clearer.
SEED: (2nd example - circular reference)
MODEL: (1st example - missing FK in EFAlias)
66 replies
✅ Determining a Configuration Type
I'm running into a problem trying to access a specific property of a configuration type. I'm unsure if I'm having this problem due to the layout of my configuration or just part of C# I've not yet ran into. 🙂
I have an enum
VoteType
with 4 members, Kick, Ban, Map, Skip, Mute.
I have a configuration for those relevant types KickConfiguration
, BanConfiguration
, MuteConfiguration
etc these configurations inherit from BaseConfiguration
Each 'TYPE'Configuration has a inherited property Cooldown
.
In my code, I need to access this cooldown specific to the vote type.
How do I do this? In the method I need it, I have access to the VoteType
enum. I'm not sure if there's a way to infer the configuration type from this enum?
The full property 'path'(?) is...
Let's say I've got this method..
21 replies