protected SqlCommand CreateNodeCommand(out Guid newNodeId)
{
SqlCommand createNodeCommand = new SqlCommand();
createNodeCommand.CommandText = "INSERT INTO dbo.[Nodes] ([NodeUid], [NodeOriginalId], [NodeTypeUid], [DomainUid]) VALUES (@NodeUid, @NodeOriginalId, @NodeTypeUid, @DomainUid)";
createNodeCommand.Connection = Connection;
newNodeId = Guid.NewGuid();
createNodeCommand.Parameters.AddWithValue("@NodeUid", newNodeId);
createNodeCommand.Parameters.AddWithValue("@NodeOriginalId", OriginalId);
createNodeCommand.Parameters.AddWithValue("@NodeTypeUid", NodeType.Id);
createNodeCommand.Parameters.AddWithValue("@DomainUid", DomainId.GetValue());
return createNodeCommand;
}
}