Ejemplo n.º 1
0
        public ActionResult DeleteConfirmed(Guid id)
        {
            var contactInfoDetail = _contactApplicationService.GetContactInfo(id);

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