public IHttpActionResult PutFavorite(int id, int favoriteid, [FromBody] Favorite favorito) { try { FavoriteManager manager = new FavoriteManager(); Favorite temp = manager.Obtener(favoriteid); if (temp.customer.id == id) { favorito.customer.id = id; Favorite result = manager.Editar(favoriteid, favorito); if (result != null) { return(Ok()); } else { return(BadRequest()); } } else { return(NotFound()); } }catch (Exception e) { return(NotFound()); } }