示例#1
0
 /// <summary>
 /// 执行查询操作
 /// </summary>
 /// <returns></returns>
 public List <dynamic> Query(string str, object param = null)
 {
     using (var conn = new DbBase().DbConnecttion) {
         return(conn.Query(str, param).ToList());
     }
 }
示例#2
0
 /// <summary>
 /// 执行Oracle存储过程
 /// </summary>
 /// <param name="procedureName">存储过程名</param>
 /// <param name="oracleDynamicParameters">参数</param>
 /// <returns></returns>
 public List <dynamic> ExecuteProcedure(string procedureName, OracleDynamicParameters oracleDynamicParameters)
 {
     using (var conn = new DbBase().DbConnecttion) {
         return(conn.Query(procedureName, oracleDynamicParameters, commandType: CommandType.StoredProcedure).ToList());
     }
 }
示例#3
0
 /// <summary>
 /// 查询一条记录
 /// </summary>
 /// <returns></returns>
 public dynamic Get(string str, object param = null)
 {
     using (var conn = new DbBase().DbConnecttion) {
         return(conn.Query(str, param).SingleOrDefault());
     }
 }