public async Task <bool> ExistAsync(Guid id) { // ** Check if event is not idempotent _logger.CreateLogger <EventRequestManager>().LogInformation("----- Checking idempotency of integration event: {IntegrationEventId} at {AppName}", id, Program.AppName); var request = await _context. FindAsync <EventRequest>(id); if (request != null) { // ** Check if event is not idempotent _logger.CreateLogger <EventRequestManager>().LogTrace("----- Event already exists: {IntegrationEventId} at {AppName}", id, Program.AppName); return(false); } return(request != null); }