You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This allows the ability to do query across 2 repositories that are
related by a key without exposing the IQueryable stuff directly, which
we probably don't want exposed too much since it's more of an internal
thing
/// Gives access to an IQueryable<T> for this repository. You can then use this to join with other IQueryable's for more complicated queries.
20
-
/// </summary>
21
-
/// <returns></returns>
22
-
IQueryable<T>AsQueryable();
23
-
24
-
25
-
/// <summary>
26
-
/// Gets the specified entity of type <typeparamref name="T"/> from the repository by the primary key.
27
-
/// </summary>
28
-
/// <param name="key">The primary key.</param>
29
-
/// <returns>The entity that matches on the primary key</returns>
30
-
TGet(TKeykey);
31
-
32
-
/// <summary>
33
-
/// Gets the specified entity of type <typeparamref name="T"/> from the repository by the primary key and maps it to the result of type <typeparamref name="TResult"/>.
34
-
/// </summary>
35
-
/// <typeparam name="TResult">The type of the result.</typeparam>
36
-
/// <param name="key">The primary key.</param>
37
-
/// <param name="selector">The mapping selector that returns the result type.</param>
38
-
/// <returns>The mapped entity based on the selector that matches on the primary key.</returns>
/// Finds a single entity that matches the predicate supplied using FirstOrDefault with an optional query option, like sorting options, and maps it to a new type based on the selector.
73
-
/// </summary>
74
-
/// <typeparam name="TResult">The type of the result.</typeparam>
75
-
/// <param name="predicate">The predicate used to match entities against.</param>
76
-
/// <param name="selector">The mapping selector that returns the result type.</param>
77
-
/// <param name="queryOptions">The query options to use (usually sorting) since this uses FirstOrDefault.</param>
/// Finds a single entity that matches the specification criteria using FirstOrDefault with an optional query option, like sorting options, and maps to a new type based on the selector.
91
-
/// </summary>
92
-
/// <typeparam name="TResult">The type of the result.</typeparam>
93
-
/// <param name="criteria">The specification criteria that is used for matching entities against.</param>
94
-
/// <param name="selector">The mapping selector that returns the result type.</param>
95
-
/// <param name="queryOptions">The query options to use (usually sorting) since this uses FirstOrDefault.</param>
/// Finds all entities that match the predicate with an optional query option applied (like paging or sorting), and maps to a new type based on the selector provided.
109
-
/// </summary>
110
-
/// <typeparam name="TResult">The type of the result.</typeparam>
111
-
/// <param name="predicate">The predicate used to match entities against.</param>
112
-
/// <param name="selector">The mapping selector that returns the result type.</param>
113
-
/// <param name="queryOptions">The query options to apply like paging or sorting.</param>
/// Finds all entities that match the specification criteria with an optional query option applied (like paging or sorting), and maps to a new type based on the selector provided.
127
-
/// </summary>
128
-
/// <typeparam name="TResult">The type of the result.</typeparam>
129
-
/// <param name="criteria">The specification criteria that is used for matching entities against.</param>
130
-
/// <param name="selector">The mapping selector that returns the result type.</param>
131
-
/// <param name="queryOptions">The query options to apply like paging or sorting.</param>
0 commit comments