public ActionResult <string> Delete(Guid phoneId) { ActionResult retval = BadRequest(phoneId); try { if (_phoneService.Delete(phoneId)) { retval = new OkObjectResult(phoneId); } } catch (Exception e) { Console.Write(e); } return(retval); }
public ActionResult Delete(int id) { service.Delete(id); return(PartialView("View1", service.GetPhones())); }
// DELETE api/<controller>/5 public void Delete(int id) { service.Delete(id); }