Vogen
Vogen copied to clipboard
It is not fully compatible with ASP.NET 8
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
app.MapGet("test/{eventId}", (EventId eventId) => Results.Ok(eventId));
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:
public static bool TryParse(string value, IFormatProvider provider, out EventId eventId)
{
eventId= From(value);
return true;
}
Could you please to add more compatiblity with Asp.Net?