Ejemplo n.º 1
0
 [HttpDelete("{id}")] // DELETE
 public ActionResult <DbCombo> Delete(int id)
 {
     try
     {
         return(Ok(_comboService.Delete(id)));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }
        public ActionResult ComboItemDeleteConfirmed(int id)
        {
            Combo combo = _comboService.GetModel(id);

            if (combo == null)
            {
                return(HttpNotFound());
            }
            _comboService.Delete(combo);
            return(Redirect(Url.Action("Home") + "#specialDeals"));
        }