=== Summary: 675 files | 7 generated | 484 fresh | 4605 untracked | 4268 adopted | 355 marked | 466 validated-ok | 2+0 stale (sig+body) | 0 skipped | 0 failed | elapsed 11:08:11.442 (40091.44s) ===
This commit is contained in:
@@ -29,6 +29,7 @@ namespace adas_core.Domain;
|
||||
/// </code>
|
||||
/// </example>
|
||||
/// </summary>
|
||||
/// <!-- aidoc:v1 sig=0f0f12f -->
|
||||
public class QueryCustomizer<T> where T : class
|
||||
{
|
||||
private readonly List<Expression<Func<T, object>>> _includeLinqExpressions = [];
|
||||
@@ -38,6 +39,7 @@ public class QueryCustomizer<T> where T : class
|
||||
/// Creates and returns a new instance of the <see cref="QueryCustomizer{T}"/> class.
|
||||
/// </summary>
|
||||
/// <returns>A new <see cref="QueryCustomizer{T}"/> instance.</returns>
|
||||
/// <!-- aidoc:v1 sig=21eb01d body=b0a5bab -->
|
||||
public static QueryCustomizer<T> New()
|
||||
{
|
||||
return new QueryCustomizer<T>();
|
||||
@@ -48,6 +50,7 @@ public class QueryCustomizer<T> where T : class
|
||||
/// </summary>
|
||||
/// <param name="includeExpression">A lambda expression selecting the related entity to include in the query results.</param>
|
||||
/// <returns>The current <see cref="QueryCustomizer{T}"/> instance to allow fluent chaining of additional includes or customizations.</returns>
|
||||
/// <!-- aidoc:v1 sig=404974a body=eeec9fd -->
|
||||
public QueryCustomizer<T> Include(Expression<Func<T, object>> includeExpression)
|
||||
{
|
||||
_includeLinqExpressions.Add(includeExpression);
|
||||
@@ -59,6 +62,7 @@ public class QueryCustomizer<T> where T : class
|
||||
/// </summary>
|
||||
/// <param name="includeExpressions">The expressions specifying the related entities to include in the query.</param>
|
||||
/// <returns>The current <see cref="QueryCustomizer{T}"/> instance to support fluent method chaining.</returns>
|
||||
/// <!-- aidoc:v1 sig=d7110f2 body=0a0314a -->
|
||||
public QueryCustomizer<T> Include(params Expression<Func<T, object>>[] includeExpressions)
|
||||
{
|
||||
_includeLinqExpressions.AddRange(includeExpressions);
|
||||
@@ -70,6 +74,7 @@ public class QueryCustomizer<T> where T : class
|
||||
/// </summary>
|
||||
/// <param name="includeExpression">The include expression to be added to the collection of include expressions.</param>
|
||||
/// <returns>The current <see cref="QueryCustomizer{T}"/> instance with the include expression added.</returns>
|
||||
/// <!-- aidoc:v1 sig=3bdcd2a body=f954d2e -->
|
||||
public QueryCustomizer<T> Include(string includeExpression)
|
||||
{
|
||||
_includeLinqStringExpressions.Add(includeExpression);
|
||||
@@ -81,6 +86,7 @@ public class QueryCustomizer<T> where T : class
|
||||
/// </summary>
|
||||
/// <param name="includeExpressions">The string expressions representing the related entities or paths to include in the query.</param>
|
||||
/// <returns>The current <see cref="QueryCustomizer{T}"/> instance to enable fluent method chaining.</returns>
|
||||
/// <!-- aidoc:v1 sig=684e75d body=681d029 -->
|
||||
public QueryCustomizer<T> Include(params string[] includeExpressions)
|
||||
{
|
||||
_includeLinqStringExpressions.AddRange(includeExpressions);
|
||||
@@ -94,6 +100,7 @@ public class QueryCustomizer<T> where T : class
|
||||
/// </summary>
|
||||
/// <param name="queryable">The source queryable to which the include expressions will be applied.</param>
|
||||
/// <returns>An <see cref="IQueryable{T}"/> with all configured include expressions applied.</returns>
|
||||
/// <!-- aidoc:v1 sig=5890dbb body=6eaed69 -->
|
||||
public IQueryable<T> AddToQueryable(IQueryable<T> queryable)
|
||||
{
|
||||
var resultQueryable = queryable;
|
||||
|
||||
Reference in New Issue
Block a user