EndpointExtensions.UseConnection<TResponse> method
namespace: Serenity.Services assembly: Serenity.Net.Web
Executes a callback by passing a connection object and converts any exception raised inside to a service response.
public static Result<TResponse> UseConnection<TResponse>(this ControllerBase controller,
string connectionKey, Func<IDbConnection, TResponse> handler)
where TResponse : ServiceResponse, new()
| parameter | description |
|---|---|
| TResponse | Response type |
| controller | Controller |
| connectionKey | Connection key |
| handler | Handler callback |
See Also
- class Result<TResponse>
- class TResponse
- class ServiceResponse
- class EndpointExtensions