public async Task <IActionResult> DeleteConfirmed(int id) { var eventLog = await _context.EventLog.FindAsync(id); _context.EventLog.Remove(eventLog); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); }
private async Task ProcessLogQueue() { while (!_shutDown.IsCancellationRequested) { var logEntity = await _logQueue.DequeueAsync(_shutDown.Token); if (logEntity != null) { await _loggerDbContext.LogEntity.AddAsync(logEntity); await _loggerDbContext.SaveChangesAsync(); } } }