-
-
Notifications
You must be signed in to change notification settings - Fork 248
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
The type initializer for 'FastEndpoints.RequestBinder`1' threw an exception. #436
Comments
just make public class MyEndpoint : Endpoint<List<Site>>
{
public override async Task HandleAsync(List<Site> req, CancellationToken ct)
{
}
} |
List works but creating a class that inherits from List does not work. This Works:
Changing MyEndpointCommand to
Does not work. However this also will work (Not with the list but with just 1):
I can add the Data but it seams like inheriting from List should work |
added support for inherited public sealed class MyEndpointCommand : List<Site> { } however this is not: public sealed class MyEndpointCommand : List<Site>
{
public uint RequestUserId { get; set; }
public bool RequestIsAdmin { get; set; }
public string RequestUserName { get; set; }
} this essentially makes it bindable as a json object and not a json array and the inheritance of i.e. this cannot be done with |
I have FastEndpoints working for requests with 1 item, however I'm trying to add an endpoint that will accept a list of items to add/update. Any idea what I'm doing wrong?
Request:
Endpoint code
Error Message:
The text was updated successfully, but these errors were encountered: