Skip to content

EqServiceProviderDb class

Class EqServiceProviderDb. Provides basic functionality for building EasyQuery service to process AJAX requests from EasyQuery JavaScript widgets. Can be used to create MVC controller, WebService class or WebAPI controller

public class Korzh.EasyQuery.Services.EqServiceProviderDb
: EqServiceProvider
TypeNameDescription
DbConnectionConnectionGets or sets the connection used to execute SQL statements.
Func<DbConnection>ConnectionResolver
DbQueryFormatsFormatsGets or sets the formats passed to Korzh.EasyQuery.Db.SqlQueryBuilder before SQL generation.
BooleanLoadModelFromConnectionGets or sets a value indicating whether the default model loader should try to load model from connection.
Action<DbCommand>SqlCommandPreExecuteGets or sets the function which is called before execution of some DbCommand.
TypeNameDescription
QueryBuilderResultBuildQuery(Query query, JsonDict optionsDict = null, Boolean addPaging = False)Builds SQL statement by the DbQuery object. This methods calls QueryBuilder delegate to build SQL.
voidCheckConnection()Checks whether the connection defined in Korzh.EasyQuery.Services.EqServiceProviderDb.Connection property is not null. Opens the connection if it’s not opened yet.
DataModelCreateModel()
QueryCreateQuery()Creates new DbQuery object.
QueryFormatsCreateQueryFormats()
voidDefaultModelLoader(DataModel model, String modelId)Default implementation of the model loader .
IEqResultSetExecuteQueryCore(Query query, JsonDict optionsDict = null)
IEqResultSetGetEmptyResultSet()Gets any empty result set.
IEnumerable<ListItem>GetListCore(ListRequestOptions options)Returns list of values by its name. This method is usually called by GetList action of EasyQueryController.
IEqResultSetGetResultSetBySql(String sql, QueryParamList queryParams = null)Creates and returns a ResultSet object by SQL statement.