Ejemplo n.º 1
0
        public SqlDataReaderLRAP ExecuteReader(CommandBehavior behavior = CommandBehavior.Default)
        {
            var reqResult = LoggingDB.LogRequest(this, LoggingDBType.CmdReader, behavior);
            var cmdDto    = reqResult.Object as SqlCommandDTO;

            return(new SqlDataReaderLRAP(cmdDto, Cmd.ExecuteReader(behavior)));
        }
Ejemplo n.º 2
0
        public async Task <SqlDataReaderLRAP> ExecuteReaderAsync(CommandBehavior behavior = CommandBehavior.Default)
        {
            var reqResult = LoggingDB.LogRequest(this, LoggingDBType.CmdReader, behavior);
            var cmdDto    = reqResult.Object as SqlCommandDTO;
            var result    = await Cmd.ExecuteReaderAsync(behavior);

            return(new SqlDataReaderLRAP(cmdDto, result));
        }
Ejemplo n.º 3
0
        public async Task <int> ExecuteNonQueryAsync()
        {
            var reqResult = LoggingDB.LogRequest(this, LoggingDBType.CmdNonQuery);
            var cmdDto    = reqResult.Object as SqlCommandDTO;
            var cmdResult = await Cmd.ExecuteNonQueryAsync();

            LoggingDB.LogResponse(cmdDto, cmdResult);
            return(cmdResult);
        }
Ejemplo n.º 4
0
        public object ExecuteScalar()
        {
            var reqResult = LoggingDB.LogRequest(this, LoggingDBType.CmdScalar);
            var cmdDto    = reqResult.Object as SqlCommandDTO;
            var cmdResult = Cmd.ExecuteScalar();

            LoggingDB.LogResponse(cmdDto, cmdResult);
            return(cmdResult);
        }
Ejemplo n.º 5
0
        public int ExecuteNonQuery()
        {
            var reqResult = LoggingDB.LogRequest(this, LoggingDBType.CmdNonQuery);
            var cmdDto    = reqResult.Object as SqlCommandDTO;
            var cmdResult = Cmd.ExecuteNonQuery();

            LoggingDB.LogResponse(cmdDto, cmdResult);
            return(cmdResult);
        }