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);
        }
예제 #2
0
 public ActionResult Delete(int id)
 {
     service.Delete(id);
     return(PartialView("View1", service.GetPhones()));
 }
예제 #3
0
 // DELETE api/<controller>/5
 public void Delete(int id)
 {
     service.Delete(id);
 }