Skip to content

Commit

Permalink
Corrected property PrimaryIdNode
Browse files Browse the repository at this point in the history
  • Loading branch information
rappen committed Aug 7, 2022
1 parent baf352a commit b508010
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion FetchXmlBuilder/DockControls/TreeBuilderControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,11 @@ internal FetchXmlElementControlBase GetCurrentControl()

internal TreeNode PrimaryIdNode =>
tvFetch.Nodes.Cast<TreeNode>()?
.FirstOrDefault(n => n.Name == "attribute" && n.Parent?.Name == "entity" && n.Value("name") == PrimaryIdName);
.FirstOrDefault(n => n.Name == "fetch")?
.Nodes.Cast<TreeNode>()?
.FirstOrDefault(n => n.Name == "entity")?
.Nodes.Cast<TreeNode>()?
.FirstOrDefault(n => n.Name == "attribute" && n.Value("name") == PrimaryIdName);

private int GetUniqueLinkEntitySuffix(TreeNode entity)
{
Expand Down

0 comments on commit b508010

Please sign in to comment.