Esempio n. 1
0
 public IHttpActionResult GetById(int id)
 {
     try
     {
         var address    = _addressManager.GetById <Address>(id);
         var addressDTO = _addressFactory.CreateAddressDTO(address);
         return(Content(HttpStatusCode.OK, addressDTO));
     }
     catch (Exception ex)
     {
         return(Content(HttpStatusCode.InternalServerError, ex.Message));
     }
 }