Exemplo n.º 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());
     }
 }
Exemplo n.º 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());
     }
 }
Exemplo n.º 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());
     }
 }