Пример #1
0
 public override int Fill(DataSet dataSet)
 {
     if (SelectCommand != null)
     {
         InnerDataAdapter.SelectCommand = ((GlimpseProfileDbCommand)SelectCommand).Inner;
     }
     return(InnerDataAdapter.Fill(dataSet));
 }
Пример #2
0
        public override int Fill(DataSet dataSet)
        {
            if (SelectCommand != null)
            {
                var typedCommand = SelectCommand as GlimpseDbCommand;
                if (typedCommand != null)
                {
                    InnerDataAdapter.SelectCommand = typedCommand.Inner;

                    var result    = 0;
                    var commandId = Guid.NewGuid();

                    var timer = typedCommand.LogCommandSeed();
                    typedCommand.LogCommandStart(commandId, timer);
                    try
                    {
                        result = InnerDataAdapter.Fill(dataSet);
                    }
                    catch (Exception exception)
                    {
                        typedCommand.LogCommandError(commandId, timer, exception, "ExecuteDbDataReader");
                        throw;
                    }
                    finally
                    {
                        typedCommand.LogCommandEnd(commandId, timer, result, "ExecuteDbDataReader");
                    }

                    return(result);
                }

                InnerDataAdapter.SelectCommand = SelectCommand;
            }

            return(InnerDataAdapter.Fill(dataSet));
        }