EasyQuery for ASP.NET MVC - getting started

Sorry this article is outdated. Use this one instead: http://docs.korzh.com/easyquery/getting-started/getting-started-mvc

Discussion

, 2013/06/15 07:09
Hi,

1) in the last script can you please explain, what is the 4th line doing?

var query = QueryPanelBlock.QueryPanel('option', 'query');

2) How is this executing on serverside

function buildAndExecute() {
var QueryPanelBlock = $("#QueryPanel");
var query = QueryPanelBlock.QueryPanel('option', 'query');

EQ.client.buildAndExecute({
"query": query,
success: function (result) {
BuildQuerySuccess(result.statement);
ExecuteSQLSuccess(result.resultSet);
},

3) will this work with JSON, Ajax or POST
, 2013/06/17 13:15
1. That code gets the Query object from QueryPanel widget.
Query object contains the internal query structure: list of columns, condition tree, etc.
However in the latest version you can get Query object in a more simple way:

var query = EQ.client.getQuery();


2. This function sends a request to ExecuteSql action in sever-side EasyQuery controller or web-service.
That action builds an SQL statement by the query object passed in request parameter in JSON format, then executes that SQL and returns the result set again in JSON.
If you use the default implementation - then all you need to do is to derive your own class from EqDbMvcController and implement GetDataSetBySql() method.

3. Not sure if I unserstood your question correctly.
That function makes jQuery ajax() call with type: "POST", dataType:"JSON".
, 2014/11/03 20:27
How to bind the model on the fly. I tried lot to do that but not able to get proper help from it. I am having Sql Database.
, 2014/11/03 22:05
Sorry this article is outdated.
Here is the new "getting started" instructions for setting up EasyQuery in MVC:
http://docs.korzh.com/easyquery/getting-started/getting-started-mvc

As for "on the fly" model binding - use this article:
http://docs.korzh.com/easyquery/how-to/build-data-model-from-db
Enter your comment: