Skip to content

Add a framework to embrace MediatR #759

@Kaliumhexacyanoferrat

Description

@Kaliumhexacyanoferrat

As a developer of a web application, I would like to simply re-use my MediatR handlers and forget about that complicated HTTP stuff, so that I can omit a lot of boilerplate code.

Example

public record GetUserQuery(int Id) : IRequest<User>;

var users = MediatRService.Create()
                          .Get<GetUserDetailsQuery>(":Id"); // automatically calls _mediator.Send(query)

var api = Layout.Create()
                .Add("users", users)
                .AddOpenApi();

Acceptance criteria

  • The feature is implemented as new framework
  • There is a new template project for this kind of projects
  • The feature is documented on the GenHTTP website
  • The feature is covered by acceptance tests

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions