ardalis / Result

A result abstraction that can be mapped to HTTP response codes if needed.
MIT License
847 stars 100 forks source link

Add Support For FastEndpoints #157

Open KyleMcMaster opened 10 months ago

KyleMcMaster commented 10 months ago

We already have support for Minimal API results so it would be awesome to see what work is needed to also support FastEndpoints like we do for Controllers/APIEndpoints. If any code is needed it could probably be added to the AspNetCore package unless we would like to add an Ardalis.Result.FastEndpoints package

itsoli91 commented 8 months ago

FastEndpoint already has a SendResultAsync() to send any IResult instance produced by the Results static class in Minimal APIs. So simply you can call something like this: await SendResultAsync(result.ToMinimalApiResult()); More info: https://fast-endpoints.com/docs/misc-conveniences#send-methods