public IHttpActionResult Put([FromBody] Track track) { try { int rowsEffected = TrackDB.UpdateTrack(track); if (rowsEffected > 0) { return(Content(HttpStatusCode.OK, track)); } else { return(Content(HttpStatusCode.NotFound, $"Track with id {track.TrackCode} was not found to update!")); } } catch (Exception ex) { return(Content(HttpStatusCode.BadRequest, ex)); } }