LambdaExpressionBuilder 2.0.2-beta

Useful to turn WebApi requests parameters into expressions, create advanced search screens with the capability to save and re-run those filters, among other things.

This is a prerelease version of LambdaExpressionBuilder.
There is a newer prerelease version of this package available.
See the version list below for details.
Install-Package LambdaExpressionBuilder -Version 2.0.2-beta
dotnet add package LambdaExpressionBuilder --version 2.0.2-beta
<PackageReference Include="LambdaExpressionBuilder" Version="2.0.2-beta" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add LambdaExpressionBuilder --version 2.0.2-beta
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Use LambdaExpressionBuilder to easily create lambda expressions to filter lists and database queries. It can be useful to turn WebApi requests parameters into expressions, create advanced search screens with the capability to save and re-run those filters, among other things.

Features:

  • Ability to reference properties by their names
  • Ability to reference properties from a property
  • Ability to reference properties from list items
  • Built-in null-checks
  • Built-in XML serialization
  • Globalization support
  • Support for complex expressions (those that group up statements within parenthesis)
  • Ability to create your own custom operations or overwrite the behaviour of the default operations

New on version 2.0.2:

New on version 2:

  • Custom operations: create your own operations or overwrite the behaviour of the default operations
  • Full support to Properties and Fields
  • Enum renaming: FilterStatementConnector has changed to just Connector
  • Other minor improvements

Upgrading to version 2:

Below are a few notes on things you must take into account when upgrading from version 1 to version 2:

  • The Operation enum was substituted by a class. So, you'll need to add a reference to the new namespace in order to use it: using ExpressionBuilder.Operations;
  • Obtaining operations by their names:
    <br />Before: (Operation)Enum.Parse(typeof(Operation), &quot;EqualTo&quot;)
    <br />Now: Operation.GetByName(&quot;EqualTo&quot;)
  • Getting the number of values expected by an operation:
    <br />Before: new OperationHelper().NumberOfValuesAcceptable(Operation.EqualTo)
    <br />Now: Operation.EqualTo.NumberOfValues
  • Connecting filter statements:
    <br />Before: FilterStatementConnector.And
    <br />Now: Connector.And

New on version 1.1.2:

Use LambdaExpressionBuilder to easily create lambda expressions to filter lists and database queries. It can be useful to turn WebApi requests parameters into expressions, create advanced search screens with the capability to save and re-run those filters, among other things.

Features:

  • Ability to reference properties by their names
  • Ability to reference properties from a property
  • Ability to reference properties from list items
  • Built-in null-checks
  • Built-in XML serialization
  • Globalization support
  • Support for complex expressions (those that group up statements within parenthesis)
  • Ability to create your own custom operations or overwrite the behaviour of the default operations

New on version 2.0.2:

New on version 2:

  • Custom operations: create your own operations or overwrite the behaviour of the default operations
  • Full support to Properties and Fields
  • Enum renaming: FilterStatementConnector has changed to just Connector
  • Other minor improvements

Upgrading to version 2:

Below are a few notes on things you must take into account when upgrading from version 1 to version 2:

  • The Operation enum was substituted by a class. So, you'll need to add a reference to the new namespace in order to use it: using ExpressionBuilder.Operations;
  • Obtaining operations by their names:
    <br />Before: (Operation)Enum.Parse(typeof(Operation), &quot;EqualTo&quot;)
    <br />Now: Operation.GetByName(&quot;EqualTo&quot;)
  • Getting the number of values expected by an operation:
    <br />Before: new OperationHelper().NumberOfValuesAcceptable(Operation.EqualTo)
    <br />Now: Operation.EqualTo.NumberOfValues
  • Connecting filter statements:
    <br />Before: FilterStatementConnector.And
    <br />Now: Connector.And

New on version 1.1.2:

Release Notes

Main changes in this version:
     • 'FilterFactory' class added to offer a "non-generics" approach for creating filters (issue #25)
     • Improved support for nested properties (issues #26 and #29)
     • Added new 'NotIn' operator (issue #36)
     • Fixed bug that used to throw an exception when using the `In` operator over a nullable property (issue #37)

Dependencies

This package has no dependencies.

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
2.1.0-rc 339 2/13/2019
2.0.2-beta 180 1/19/2019
2.0.1 1,853 6/1/2018
1.1.2 473 2/26/2018
1.1.2-rc 403 12/6/2017
1.1.1.22080 772 8/23/2017
1.1.0.27210 390 7/10/2017