[]
A hint to create and use an index on the specified XML element. The hint has default action.
public static XHint IndexedElement(this XContainer container, XName name)
Type | Name | Description |
---|---|---|
XContainer | container | The element or document containing the element. |
XName | name | The name of the element to get. |
Type | Description |
---|---|
XHint | The element that has the specified name. |
Hints are used declaratively. They tell LiveLinq query optimizer to create and use an index on this element, if possible. When the query is executed, the hint method IndexedElement is replaced with the standard LINQ to XML method Element(XName). See Hints for more details.
var query =
from c in customers
where (string)c.IndexedElement("CustomerID") == "ALFKI"
select c;
A hint to create and use an index on the specified XML element. The hint has default action.
public static XHint IndexedElement(this XElement element)
Type | Name | Description |
---|---|---|
XElement | element | The element to apply the hint to. |
Type | Description |
---|---|
XHint | Formally, the hint returns the same value that it receives in the parameter. In fact, it is never executed, its role is purely declarative. |
Hints are used declaratively. They tell LiveLinq query optimizer to create and use an index on this element, if possible. After it is used for query optimization, before the query is executed, this hint is removed from the expression. See Hints for more details.
var query =
from c in customers
where (string)c.Element("CustomerID").IndexedElement() == "ALFKI"
select c;
A hint to create and use an index on the specified XML element. The hint has specified action.
public static XHint IndexedElement(this XElement element, IndexingHintAction action)
Type | Name | Description |
---|---|---|
XElement | element | The element to apply the hint to. |
IndexingHintAction | action | The action specified by the hint. |
Type | Description |
---|---|
XHint | Formally, the hint returns the same value that it receives in the parameter. In fact, it is never executed, its role is purely declarative. |
Hints are used declaratively. They tell LiveLinq query optimizer to create and use an index on this element, if possible. After it is used for query optimization, before the query is executed, this hint is removed from the expression. See Hints for more details.
var query =
from c in customers
where (string)c.Element("CustomerID").IndexedElement(IndexingHintAction.Mandatory) == "ALFKI"
select c;
A hint to create and use an index on the specified XML element. The hint has specified action.
public static XHint IndexedElement(this XContainer container, XName name, IndexingHintAction action)
Type | Name | Description |
---|---|---|
XContainer | container | The element or document containing the element. |
XName | name | The name of the element to get. |
IndexingHintAction | action | The action specified by the hint. |
Type | Description |
---|---|
XHint | The element that has the specified name. |
Hints are used declaratively. They tell LiveLinq query optimizer to create and use an index on this element, if possible. When the query is executed, the hint method IndexedElement is replaced with the standard LINQ to XML method Element(XName). See Hints for more details.
var query =
from c in customers
where (string)c.IndexedElement("CustomerID", IndexingHintAction.Mandatory) == "ALFKI"
select c;