EndpointExtensions.ExecuteMethod<TResponse> method
namespace: Serenity.Services assembly: Serenity.Net.Web
Executes an action method and converts any exception to a service response
public static Result<TResponse> ExecuteMethod<TResponse>(this ControllerBase controller,
Func<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