Strongly typed IDs #1527
Unanswered
DirtyNative
asked this question in
Q&A
Replies: 1 comment
-
|
@DirtyNative Did you find a solution for your problem? I have one addition: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am wondering how to get strongly typed IDs to work with Refit. I am using this package to automatically generate all needed things for the IDs. Here are the classes:
This works quiet fine as long as I define the "userId" as a Guid. Preferably when working with strongly typed IDs I want to use the UserId here, but this results in Exceptions which I think Refit is producing.
Refit.ApiException: Response status code does not indicate success: 400 (Bad Request). at Refit.RequestBuilderImplementation.<>c__DisplayClass14_02.<b__0>d.MoveNext() in /_/Refit/RequestBuilderImplementation.cs:line 288--- End of stack trace from previous location ---
`
I guess Refit is not able to convert the UserId correctly to a Guid, even that I have included the Converters within my RefitSettings. Do I miss something here or is Refit not meant to be used with this feature?
Beta Was this translation helpful? Give feedback.
All reactions