public ActionResult DeleteConfirmed(Guid id) { var contactInfoDetail = _contactCrudService.GetContactInfo(id); _contactCrudService.DeleteContactInfo(id); return(RedirectToAction("Edit", "Contacts", new { id = contactInfoDetail.ContactId })); }
public HttpResponseMessage Delete(Guid id) { try { _contactCrudService.DeleteContactInfo(id); return(Request.CreateResponse(HttpStatusCode.OK)); } catch (ValidationException ex) { return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ex.Message)); } }