EndpointExtensions.ExecuteMethodAsync<TResponse> method

namespace: Serenity.Services   assemblySerenity.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