ardalis / Result

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

Add Support For FastEndpoints #157

Open KyleMcMaster opened 1 year ago

KyleMcMaster commented 1 year 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 11 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