mirror of
https://github.com/azaion/admin.git
synced 2026-04-22 08:26:33 +00:00
[AZ-189] [AZ-190] [AZ-191] [AZ-192] [AZ-193] [AZ-194] [AZ-195] Add e2e blackbox test suite
Made-with: Cursor
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
# Module: Azaion.Common.Extensions.QueryableExtensions
|
||||
|
||||
## Purpose
|
||||
Conditional LINQ `Where` extension for building dynamic query filters.
|
||||
|
||||
## Public Interface
|
||||
|
||||
| Method | Signature | Description |
|
||||
|--------|-----------|-------------|
|
||||
| `WhereIf<TSource>` | `static IQueryable<TSource> WhereIf<TSource>(this IQueryable<TSource> query, bool? condition, Expression<Func<TSource, bool>> truePredicate, Expression<Func<TSource, bool>>? falsePredicate = null)` | Applies `truePredicate` when condition is true, optional `falsePredicate` when false, no-op when null |
|
||||
|
||||
## Internal Logic
|
||||
If `condition` is null, returns the query unmodified. If true, applies `truePredicate`. If false and `falsePredicate` is provided, applies it; otherwise returns unmodified query.
|
||||
|
||||
## Dependencies
|
||||
- `System.Linq.Expressions` (BCL only)
|
||||
|
||||
## Consumers
|
||||
- `UserService.GetUsers` — uses `WhereIf` for optional email and role search filters
|
||||
|
||||
## Data Models
|
||||
None.
|
||||
|
||||
## Configuration
|
||||
None.
|
||||
|
||||
## External Integrations
|
||||
None.
|
||||
|
||||
## Security
|
||||
None.
|
||||
|
||||
## Tests
|
||||
None.
|
||||
Reference in New Issue
Block a user