-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It is not fully compatible with ASP.NET 8 #559
Comments
Thanks for the bug report! This is fixed in #570 - please let me know how you get on, which will be available in v4.0.0, hopefully later today. |
@SteveDunn it is working now for this case, thanks.
Test call: Result:
|
From what I can see, for Azure Function parameters, the value object needs to be decorated with an attribute:
The converter looks like this:
This makes this function work correctly:
Vogen could generate this attribute, much like it does for type converters. However, the difficulty with this approach arises when value objects wrap primitives such as I'll keep this idea in mind though. On one hand, it will be useful for the people who use Vogen's Value Objects as Azure function parameters, but on the other hand, it's a fairly big addition for what I guess is a very small amount of users. |
I see. Anyway thank you for workaround, I'll try to use it. |
It is still not well working with last version. Following code for asp.net conroller method:
where
works in debug mode, but generate following error when publish: So to fix this i need to return for using base layer int type and later don't forget to convert it to ValueObject when using in EF query:
|
@arteny - this might be Azure specific. I added a controller to the |
Describe the feature
Only case you described in doc is adding full route for each controller's method. But it is not very useful case. Most of cases route generated automatically for common rules for controller and method has only
[HttpGet]
attribute.But it is not works in this case.
Also it is not working for minimal API mechanism of Asp.Net
For instance, the following code
generates the error:
error ASP0020: Parameter 'eventId' of type EventId should define a bool TryParse(string, IFormatProvider, out EventId) method, or implement IParsable<EventId> (https://aka.ms/aspnet/analyzers)
which is fixing by adding ValueObject's method:
Could you please to add more compatiblity with Asp.Net?
The text was updated successfully, but these errors were encountered: