예제 #1
0
 /// <summary>
 /// Execute the current sql buffered in CurrentSql
 /// </summary>
 public void Execute()
 {
     if (CurrentSql != null)
     {
         CurrentSql.Execute(Database);
     }
 }
예제 #2
0
 /// <summary>
 /// Execute a query using the current sql buffered in CurrentSql
 /// and returning the results as a representation of
 /// the specified tableName
 /// </summary>
 /// <param name="tableName"></param>
 /// <returns></returns>
 public IEnumerable <dynamic> Retrieve(string tableName)
 {
     if (CurrentSql != null)
     {
         DataTable table = CurrentSql.GetDataTable(Database);
         table = MapDataTable(tableName, table);
         IEnumerable <dynamic> results = table.ToDynamicList();
         CurrentSql = null;
         return(results);
     }
     return(new List <dynamic>());
 }