[]
A hint to create and use an index on the specified XML attribute. The hint has default action.
public static XHint IndexedAttribute(this XElement element, XName name)
Type | Name | Description |
---|---|---|
XElement | element | The element containing the attribute. |
XName | name | The name of the attribute to get. |
Type | Description |
---|---|
XHint | The attribute that has the specified name. |
Hints are used declaratively. They tell LiveLinq query optimizer to create and use an index on this attribute, if possible. When the query is executed, the hint method IndexedAttribute is replaced with the standard LINQ to XML method Attribute(XName). See Hints for more details.
var query =
from c in customers
where (string)c.IndexedAttribute("CustomerID") == "ALFKI"
select c;
A hint to create and use an index on the specified XML attribute. The hint has default action.
public static XHint IndexedAttribute(this XAttribute attribute)
Type | Name | Description |
---|---|---|
XAttribute | attribute | The attribute 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 attribute, 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.Attribute("CustomerID").IndexedAttribute() == "ALFKI"
select c;
A hint to create and use an index on the specified XML attribute. The hint has specified action.
public static XHint IndexedAttribute(this XAttribute attribute, IndexingHintAction action)
Type | Name | Description |
---|---|---|
XAttribute | attribute | The attribute 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 attribute, 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.Attribute("CustomerID").IndexedAttribute(IndexingHintAction.Mandatory) == "ALFKI"
select c;
A hint to create and use an index on the specified XML attribute. The hint has specified action.
public static XHint IndexedAttribute(this XElement element, XName name, IndexingHintAction action)
Type | Name | Description |
---|---|---|
XElement | element | The element containing the attribute. |
XName | name | The name of the attribute to get. |
IndexingHintAction | action | The action specified by the hint. |
Type | Description |
---|---|
XHint | The attribute that has the specified name. |
Hints are used declaratively. They tell LiveLinq query optimizer to create and use an index on this attribute, if possible. When the query is executed, the hint method IndexedAttribute is replaced with the standard LINQ to XML method Attribute(XName). See Hints for more details.
var query =
from c in customers
where (string)c.IndexedAttribute("CustomerID", IndexingHintAction.Mandatory) == "ALFKI"
select c;