public static async Task Execute(this IRequestCommandHandler handler, RequestFactory requestFactory, HttpContext context) { context.Response.StatusCode = (int)await handler.Execute(requestFactory.Create(context), await context.PayloadFor(handler)); await context.Response.CompleteAsync(); }
public static async Task Delete(this IHandleDeleteRequests handler, RequestFactory requestFactory, HttpContext context) { context.Response.StatusCode = (int)await handler.HandleAsync(requestFactory.Create(context)); await context.Response.CompleteAsync(); }