public static Map ( IDataReader dr ) : ResultSet | ||
dr | IDataReader | |
Результат | ResultSet |
public ResultSet Query(string call, params object[] parameters) { IDataReader reader = null; try { reader = TryCreateReader(call, parameters, CommandType.Text); return(DataReaderToResultSetMapper.Map(reader)); } catch (Exception ex) { throw Provider.CreateSpecificException(ex, call); } finally { if (reader != null) { reader.Dispose(); } } }
public ResultSet CallStoredProcedure(string call, params object[] parameters) { IDataReader reader = null; try { reader = TryCreateReader(call, parameters, CommandType.StoredProcedure); ResultSet res = DataReaderToResultSetMapper.Map(reader); return(res); } catch (Exception ex) { throw Provider.CreateSpecificException(ex, call); } finally { if (reader != null) { reader.Dispose(); } } }
protected ResultSet ExecuteCatchingErrors(Func <IDataReader> getReader, string call) { IDataReader reader = null; try { BeforeActionVerifyIfExistisACommandToBeExecuted(); reader = getReader(); return(DataReaderToResultSetMapper.Map(reader)); } catch (Exception ex) { OnErrorVerifyIfExistisACommandToBeExecuted(); throw Provider.CreateSpecificException(ex, call); } finally { if (reader != null) { reader.Dispose(); } } }