Ejemplo n.º 1
0
 /// <summary>
 /// 获取分页数据
 /// </summary>
 public DatabaseResultModel<List<TDemoModel>> getListData(TDemoModel searchModel)
 {
     var result = new DatabaseResultModel<List<TDemoModel>>();
     try
     {
         using (databaseConnector = getDatabaseConnector())
         using (databaseExecutor = new Executor(databaseConnector))
         {
             databaseScriptModel = new DatabaseScriptModel();
             databaseScriptModel.command = (new TDemoScript()).getListData(searchModel);
             result.data = databaseExecutor.sqlQueryToList<TDemoModel>(databaseScriptModel);
         }
     }
     catch (Exception ex) { result.exception = ex; }
     return result;
 }