diff --git a/src/Microsoft.SqlTools.ServiceLayer/ShowPlan/Contracts/ExecutionPlanGraph.cs b/src/Microsoft.SqlTools.ServiceLayer/ShowPlan/Contracts/ExecutionPlanGraph.cs
index ecee61e4..66a38ace 100644
--- a/src/Microsoft.SqlTools.ServiceLayer/ShowPlan/Contracts/ExecutionPlanGraph.cs
+++ b/src/Microsoft.SqlTools.ServiceLayer/ShowPlan/Contracts/ExecutionPlanGraph.cs
@@ -20,6 +20,10 @@ namespace Microsoft.SqlTools.ServiceLayer.ShowPlan
/// Underlying query for the execution plan graph
///
public string Query { get; set; }
+ ///
+ /// Underlying xml string used for generating execution plan graph
+ ///
+ public string XmlString { get; set; }
}
public class ExecutionPlanNode
@@ -84,7 +88,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ShowPlan
public bool IsLongString { get; set; }
}
- public class NestedExecutionPlanGraphProperty: ExecutionPlanGraphPropertyBase
+ public class NestedExecutionPlanGraphProperty : ExecutionPlanGraphPropertyBase
{
///
/// In case of nested properties, the value field is a list of properties.
diff --git a/src/Microsoft.SqlTools.ServiceLayer/ShowPlan/ShowPlanGraphUtils.cs b/src/Microsoft.SqlTools.ServiceLayer/ShowPlan/ShowPlanGraphUtils.cs
index dac156f8..3da34952 100644
--- a/src/Microsoft.SqlTools.ServiceLayer/ShowPlan/ShowPlanGraphUtils.cs
+++ b/src/Microsoft.SqlTools.ServiceLayer/ShowPlan/ShowPlanGraphUtils.cs
@@ -18,7 +18,8 @@ namespace Microsoft.SqlTools.ServiceLayer.ShowPlan
return graphs.Select(g => new ExecutionPlanGraph
{
Root = ConvertShowPlanTreeToExecutionPlanTree(g.Root),
- Query = g.Statement
+ Query = g.Statement,
+ XmlString = xml
}).ToList();
}