/// <summary> /// 数据查询 /// </summary> /// <param name="helper"></param> /// <returns></returns> public List <T> Select(SQLHelper helper) { try { return(db.Select <T>(helper)); } catch (Exception e) { throw new Exception("数据查询失败", e); } finally { db.Dispose(); } }
public static void CreateTable(Dictionary <string, object> tableInfo) { string str; BaseDbActionService service = DbAction.CurrentDB();; SQLHelper helper; str = ResolveCreateTableSql(tableInfo); try { helper = new SQLHelper(str, Array.Empty <object>()); service.ExecuteNonQuery(helper); } catch (Exception e) { throw new Exception("数据表创建失败:执行语句\n" + str, e); } finally { service.Dispose(); } return; }