Class QueryableExt
Extension of IQueryable<T> to support eager loading of related data.
public static class QueryableExt
- Inheritance
-
QueryableExt
- Inherited Members
Methods
SingleEntity<E>(IQueryable<E>, Expression<Func<E, bool>>, object)
Returns the only element of a sequence for key
.
public static E SingleEntity<E>(this IQueryable<E> query, Expression<Func<E, bool>> predicate, object key) where E : class
Parameters
query
IQueryable<E>predicate
Expression<Func<E, bool>>key
object
Returns
- E
Type Parameters
E
Exceptions
- DataEntityNotFoundException<T>
if there is NOT exacty one element
SingleEntity<E>(IQueryable<E>, object)
Returns the only element of a sequence for key
.
public static E SingleEntity<E>(this IQueryable<E> query, object key) where E : class
Parameters
query
IQueryable<E>key
object
Returns
- E
Type Parameters
E
Exceptions
- DataEntityNotFoundException<T>
if there is NOT exacty one element