Ownix
Explore posts from serversSIASapphire - Imagine a framework
•Created by Ownix on 5/22/2024 in #sapphire-support
Just updated to 5.2.1 nothing working and no errors
28 replies
How to provide a client-side dependency to my app?
For example, an API client on NPM like so https://www.npmjs.com/package/pocketbase#specify-typescript-definitions
Any page/component should be able to use that from the browser.
2 replies
❔ If you needed to bulk sync data from an API into a DB, what would you use as a PK for child data?
For example imagine you get this data back HOURLY from GET /users:
You obviously would have a
dbo.user
table and a dbo.user_address
table.
dbo.user
would have PK Id
and dbo.user_address
would have an FK of UserId
. But what about a PK for the address table?
How could you possibly update an address without having a unique identifier from it? SHould I just TRUNCATE
followed by INSERT
?2 replies
❔ Is there a pattern for having a single collection of different object types?
This is my sample code https://dotnetfiddle.net/ffV3vY I have a WorkflowCommand a ScheduledWorkflowCommanddepending on their type they are executed in different ways. I would like to have a collection of them I can pass around and enumerate.
7 replies
❔ Argument 1: cannot convert from 'Ardalis.Result.Result' to 'TResponse'
https://dotnetfiddle.net/uebISh
Line 96. I have a contsraint that says
where TResponse : Result
so I am very confused about this error.
Result.Error("Whatever.");
IS Ardalis.Result.Result type...12 replies
❔ RazorPages - require authorization, but load title/Open Graph information still?
I have a page that requires authorization, is there a way to let the title appear for example when someone copies a link into Confluence or Microsoft Teams the page title loads in the preview?
3 replies
❔ Unit Testing dynamic data
I have a ton of unit tests that look like the following:
I want to clean up all of the casting on the dynamic data there.
I realize I could strongly type the query (
.Query<Location>
) however I have a LOT of tests and composing exact typings for my database seems like overkill doesn't it?22 replies