I am trying to call handler in FastEndPoint. This is my EndPoint code
public override void Configure()
{
Post("/api/claim/create");
//TODO: after Auth0 integration will add auth
AllowAnonymous();
}
public override async Task HandleAsync(ClaimRequest req, CancellationToken ct)
{
await new CreateClaim()
{
ClaimName = req.ClaimName
}.ExecuteAsync();
}
I defined my class that inherit CommandHandler class and implements ExecuteAsync() of base class. But i am getting runtime exception.
I followed this link https://fast-endpoints.com/docs/command-bus#_2-define-a-command-handler