Ferrous API Reference

All Types / Ferrous.AspNetCore

class FerrousEndpointBuilderExtensions

public static class FerrousEndpointBuilderExtensions

Extension methods for registering FerrousResultEndpointFilter on Minimal API endpoints and route groups.

Methods

public static RouteHandlerBuilder WithFerrousResults(
        this RouteHandlerBuilder builder,
        int defaultErrorStatusCode = StatusCodes.Status400BadRequest)

Adds FerrousResultEndpointFilter to this endpoint so Result<T, TError> and Option<T> return values are automatically mapped to HTTP responses.

public static RouteGroupBuilder WithFerrousResults(
        this RouteGroupBuilder builder,
        int defaultErrorStatusCode = StatusCodes.Status400BadRequest)

Adds FerrousResultEndpointFilter to all endpoints in this route group.