MediatorApiController.

Send<TResponse>(IRequest<TResponse>, Func<TResponse, Task<ActionResult<TResponse>>>) Method

Summary

Send an request and allow for async Microsoft.AspNetCore.Mvc.ActionResult`1

Syntax

protected Task<ActionResult<TResponse>> Send<TResponse>(IRequest<TResponse> request, Func<TResponse, Task<ActionResult<TResponse>>> success)

Attributes

Type Description
AsyncStateMachineAttribute

Type Parameters

Name Description
TResponse The response model

Parameters

Name Type Description
request IRequest<TResponse> The request model
success Func<TResponse, Task<ActionResult<TResponse>>> The method to call when the request succeeds

Return Value

Type Description
Task<ActionResult<TResponse>>