This page has been moved, the new location is https://korzh.com/easyquery/docs/how-to/mvc-save-load-query-database?.

How to save/load queries to/from database

By default EasyQueryController saves/loads queries as XML files in App_Data folder. You can easily change this default behavior and save/load queries to any other storage (for example a database).

All you need to do - is add your own handlers for QueryLoader and QuerySaver procedures in EasyQueryController constructor:

public EasyQueryController() {
    eqService = new EqServiceProviderDb();
 
    eqService.QueryLoader = (query, queryName) => {
        string queryXml = "Get query content from database here"; 
        query.LoadFromString(queryXml);
    };
 
    eqService.QuerySaver = (query, queryName) => {
        string queryXml = query.SaveToString();
        //save queryXml content into database here
    };
 
    .   .   .   .   .   .   .   .   .
}