EndpointExtensions.InTransaction<TResponse> method

namespace: Serenity.Services   assemblySerenity.Net.Web

Executes a callback by passing a unit of work object and converts any exception raised inside to a service response.

public static Result<TResponse> InTransaction<TResponse>(this ControllerBase controller, 
    string connectionKey, Func<IUnitOfWork, TResponse> handler)
    where TResponse : ServiceResponse, new()
parameter description
TResponse Response type
controller Controller
connectionKey Connection key
handler Handler callback

See Also