| IObjectDbEsentGetByIndexT Method |
Gets objects from the database by an index over a non primary key property.
Because non primary index values may not be unique, a set of results is returned.
Namespace:
Orthogonal.ObjectDb.Esent
Assembly:
Orthogonal.ObjectDb.Esent (in Orthogonal.ObjectDb.Esent.dll) Version: 4.0.0
Syntax IEnumerable<T> GetByIndex<T>(
string propertyIndexName,
Object matchValue
)
where T : class, new()
Parameters
- propertyIndexName
- Type: SystemString
The name of the property index to search. The property must not
be part of the primary key. The property Type cannot be byte[]. If no property with the
specified name is found on the Type being processed, then an empty set is returned.
- matchValue
- Type: SystemObject
The value to match when searching the property index. Objects are only
returned if their property value exactly matches this key value.
Type Parameters
- T
- The type of object to retrieve.
Return Value
Type:
IEnumerableTAn enumerable set of objects of type T.
Exceptions Exception | Condition |
---|
ArgumentNullException |
Thrown if propertyIndexName
or matchValue is null.
|
ArgumentException |
Thrown if there is a mismatch between the propertyIndexName
property Type and the matchValue object Type.
|
See Also