public async Task <IActionResult> Delete(string id) { await _storageManager.DeleteAsync(id); var toRemove = await _context.FileStorages.FindAsync(id); if (toRemove != null) { _context.FileStorages.Remove(toRemove); await _context.SaveChangesAsync(); } return(RedirectToAction("Index")); }