public async Task <IActionResult> DeleteConfirmed(string id) { try { var barName = await _barServices.Delete(id); string userId = this.User.FindFirstValue(ClaimTypes.NameIdentifier); await _notificationServices.BarDeletedNotificationToAdminAsync(userId, barName); _toast.AddSuccessToastMessage($"You successfully deleted \"{barName}\" bar!"); return(RedirectToAction(nameof(ListBars))); } catch (Exception ex) { _toast.AddErrorToastMessage(ex.Message); ViewBag.ErrorTitle = ""; return(View("Error")); } }