public async Task <IActionResult> CocktailDetails(Guid id) { var ingredients = await ingredientServices.GetAllIngredients(null); if (id == null) { return(NotFound()); } try { var cocktail = await cocktailServices.GetCocktail(id); var cocktailVM = cocktail.GetViewModel(); cocktailVM.IngredientsToChoose = ingredients.Select(c => new SelectListItem(c.Name, c.Id.ToString())).ToList(); cocktailVM.Ingredients = await ingredientServices.GetCocktailIngredients(id); cocktailVM.Bars = await cocktailServices.GetBarsOfCocktail(id); var comments = await cocktailCommentServices.GetAllCommentsForCocktail(id); cocktailVM.Comments = comments.GetViewModels(); return(View(cocktailVM)); } catch (Exception) { this.toast.AddErrorToastMessage("Something went wrong"); return(RedirectToAction("ListBars")); } }