Exemple #1
0
        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);
        }
Exemple #2
0
Fichier : Sql.cs Projet : blesh/ALE
 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;
 }