public Sql ExecuteReader(SqlCommand cmd, Action <Exception, SqlDataReader> callback) { if (callback == null) { throw new ArgumentNullException("callback"); } cmd.Connection.Open(); var state = new ExecuteReaderState(cmd, callback); cmd.BeginExecuteReader(EndExecuteReader, state); return(this); }
public Sql ExecuteReader(SqlCommand cmd, Action<Exception, SqlDataReader> callback) { if (callback == null) throw new ArgumentNullException("callback"); cmd.Connection.Open(); var state = new ExecuteReaderState(cmd, callback); cmd.BeginExecuteReader(EndExecuteReader, state); return this; }