public async Task HiLoReturn() { var tag = GetQueryStringValueAndAssertIfSingleAndNotEmpty("tag"); var end = GetLongQueryString("end"); var last = GetLongQueryString("last"); var cmd = new MergedHiLoReturnCommand { Database = Database, Key = tag, End = end, Last = last }; await Database.TxMerger.Enqueue(cmd); NoContentStatus(); }
public async Task HiLoReturn() { DocumentsOperationContext context; using (ContextPool.AllocateOperationContext(out context)) { var tag = GetQueryStringValueAndAssertIfSingleAndNotEmpty("tag"); var end = GetLongQueryString("end", required: true) ?? -1; var last = GetLongQueryString("last", required: true) ?? -1; var cmd = new MergedHiLoReturnCommand { Database = Database, Key = tag, End = end, Last = last }; await Database.TxMerger.Enqueue(cmd); HttpContext.Response.StatusCode = 200; } }