Class CriteriaExpressionBuilder
Provides functionality to build dynamic LINQ expressions based on criteria items.
Inherited Members
Namespace: Coree.NETStandard.Classes.Criteria
Assembly: Coree.NETStandard.dll
Syntax
public class CriteriaExpressionBuilder
Methods
| Edit this page View SourceBuildExpression<T>(CriteriaItems)
Builds a dynamic LINQ expression based on the provided criteria group.
Declaration
public static Expression<Func<T, bool>>? BuildExpression<T>(CriteriaItems group)
Parameters
| Type | Name | Description |
|---|---|---|
| CriteriaItems | group | The criteria items defining the filtering rules. |
Returns
| Type | Description |
|---|---|
| Expression<Func<T, bool>> | An expression representing the combined criteria; or null if no filters are provided. |
Type Parameters
| Name | Description |
|---|---|
| T | The type of the objects to filter. |
Exceptions
| Type | Condition |
|---|---|
| InvalidOperationException | Thrown when a property specified in any criteria item does not exist on type |