コード例 #1
0
ファイル: Sql.cs プロジェクト: benlesh/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);
        }
コード例 #2
0
ファイル: Sql.cs プロジェクト: 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;
 }