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

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