public async Task <IActionResult> DeleteIceOption(int id, int drinkId) { try { _drinkRepository.DeleteIceOption(id); } catch (DbUpdateConcurrencyException) { return(Json(new { success = false })); } var drink = _drinkRepository.GetDrinkById(drinkId); var table = await this.RenderViewAsync("_ListIceOption", drink.IceOptions, true); return(Json(new { success = true, html = table })); }