Я хочу вернуться из запроса, если этот клиент уже обрабатывает запрос.
// Controller
public async Task<IHttpActionResult> GetBarcode(string ticketId)
{
var customerGuid = Guid.Parse(User.Identity.GetUserId());
var ticketGuid = Guid.Parse(ticketId);
return Json(await _service.GetBarcode(customerGuid, ticketGuid));
}
// Service
public async Task<TicketBarcode> GetBarcode(Guid customerId, Guid ticketId)
{
// if already processing a request with this customerId and ticketId, then return
// if not, then proceed
Он вызывает другой API, который не может справиться с давлением.
Прошу совета, как этого добиться. Если вам нужна дополнительная информация, пожалуйста, прокомментируйте.