Strongly typed IDs #1527
Unanswered
DirtyNative
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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_0
2.<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