public HttpResponseMessage Update(ContactDetailDto contact)
 {
     try
     {
         _contactApplicationService.UpdateContact(contact);
         return(Request.CreateResponse(HttpStatusCode.OK, contact));
     }
     catch (ValidationException ex)
     {
         return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ex.Message));
     }
 }
        public ActionResult Edit(ContactDetailDto contact)
        {
            if (ModelState.IsValid)
            {
                try
                {
                    _contactApplicationService.UpdateContact(contact);
                    return(RedirectToAction("Index"));
                }
                catch (ValidationException ex)
                {
                    ModelState.AddValidationErrors(ex);
                }
            }

            contact.ContactInfos = _contactApplicationService.GetContactInfosForContact(contact.Id).ToList();
            return(View(contact));
        }