public IHttpActionResult GetParentByUsername(string username) { Parent parent = service.GetParentByUsername(username); if (parent == null) { return(NotFound()); } return(Ok(parent)); }