コード例 #1
0
 public void LogFailedCommand(Common.Commands.Infrastructure.ICommand command, Exception ex)
 {
     _databaseLayer.ExecuteNonQuery(
         "UPDATE Commands SET ExceptionDetails = @ExceptionDetails WHERE CommandId = @CommandId",
         "@ExceptionDetails", ex.ToString(),
         "@CommandId", command.CommandId.ToString());
 }
コード例 #2
0
 public void LogCommand(Common.Commands.Infrastructure.ICommand command)
 {
     _databaseLayer.ExecuteNonQuery(
         "INSERT INTO Commands(CommandId, CommandDateTime, UserName, IpAddress, CommandData) VALUES(@CommandId, @CommandDateTime, @UserName, @IpAddress, @CommandData)",
         "@CommandId", command.CommandId.ToString(),
         "@CommandDateTime", command.Timestamp.ToUniversalTime().ToString("dd-MMM-yyyy HH:mm:ss.ff"),
         "@UserName", command.User,
         "@IpAddress", command.IPAddress,
         "@CommandData", SerializeCommand(command));
 }