public IHttpActionResult GetParent(Guid id) { ParentDto parent = new ParentDto(); try { parent = db.GetParent(id); } catch (NullReferenceException e) { logger.Error(e.Message); return(NotFound()); } return(Ok(parent)); }