public async Task <IActionResult> UpdateCocktail(CocktailViewModel updatedCocktail, Guid id) { if (ModelState.IsValid) { try { var cocktailDTO = updatedCocktail.GetDtoFromVM(); await cocktailServices.UpdateCocktail(id, cocktailDTO); this.toast.AddSuccessToastMessage(Exceptions.SuccessfullyUpdated); return(RedirectToAction("ListCocktails", "Cocktail", new { Area = "" })); } catch (Exception) { this.toast.AddErrorToastMessage(Exceptions.SomethingWentWrong); return(RedirectToAction("ListCocktails", new { Area = "" })); } } return(NoContent()); }