EndpointExtensions.ExecuteMethodAsync<TResponse> method
namespace: Serenity.Services assembly: Serenity.Net.Web
Executes an action method and converts any exception to a service response
public static Task<Result<TResponse>> ExecuteMethodAsync<TResponse>(this ControllerBase controller,
Func<Task<TResponse>> handler)
where TResponse : ServiceResponse, new()
parameter | description |
---|---|
TResponse | Response type |
controller | Controller |
handler | Handler callback |
See Also
- class Result<TResponse>
- class TResponse
- class ServiceResponse
- class EndpointExtensions