20 results for "how-to/add-extra-condition"

Attaching extra data to a query on the client-side

/tutorials/attaching-extra-data-to-query-client-side

Sometimes it's necessary to attach some extra data to each query (based on some user's input on the client-side) and then use that extra data on query execution. For example, user might want to specify a date (or a period of time) as an additional filter to the any query. To add some extra data you can use beforeExecuteQuery event handler which can be defined on view initialization: Now if you check in Developer Tools (on Network tab), each .../execute request now includes ad additional data object in the request payload. Now to process this additional request data you can create your own implementation of EasyQueryManager and override its ExecuteQueryCore method. Here is an example: Here we just reconfigure our current query and add in it an additional condition group with a bunch of conditions like SomeColumns contains 'filter text' Finally, you need to register your manager class on EasyQuery middleware initialization: NB: Please note that you can read the ClientData property in any method of your custom manager.

Navigate through query conditions

/how-to/run-through-query-conditions

A code snippet which demonstrates how to run through all conditions in your query

Add a new aggregate function

/how-to/add-aggregate-function

EasyQuery allows to add new aggregate functions for user's need. Here is detailed manual of how to do it with code example.

Dynamically populate value lists by information from other conditions

/how-to/dynamically-populating-lists-mvc

Suppose we have a database with Customer entity which has Country and City attributes. For both these attributes we define the value editors which return the lists of available values (countries and cities correspondingly). Now let's imagine the user adds a condition with the Country attribute e.g. Hera the steps needed to implement such a functionality: Define a value editor for the City attribute as SQL LIST with Cities.@{{Customer.Country}} list name (here Customer.Country is the ID of the Country attribute in the Customer entity). Let's name it "CitesSqlValueList") and then in a value list resolver modify its SQL according the currently selected country and get the list of values using GetValueListAsync method of EasyQueryManager class: What's happening here.

Add query builder page from our MVC sample project in your own app

/how-to/mvc-query-builder-view-in-your-app

This article described how to set up an advanced search page in your web-application using EqMvcDemoDB project as a template.

End-user's guide

/end-user-guide

1. EasyQuery: What’s That?

Predicate class

/api-reference-4x/korzh-easyquery-namespace/predicate-class

Represents group of conditions linked by some logical operator (AND or OR).