12.4. Summary

The audit trail is now complete and meets all of Mary's requirements. Even though this was added last, it is still quite trivial to implement the audit trail in the existing objects. The steps needed to implement the audit trail in an EditObject class are as follows:

  • Modify the Save method in the EditObject class to call the AuditAdd method after a record has been inserted.

  • Modify the Save method in the EditObject class to call the AuditUpdate method after a record has been updated.

  • Turn the audit trail on for the EditObject class using the Auditing screen in the Administration section of the application.

The ENTBaseEO object and the ENTAudit objects handle the rest of the work.

Mary now has her fully functioning enterprise-level application, which she can use to track everyone's paid time off requests. After showing her all of the functionality of the workflow, the reports, the automated e-mails, the filtering capabilities on the reports, the security, and the audit trail, she is ecstatic. She has already submitted a request to upper management to give you a raise. The application included more functionality than she asked for or even knew to ask for, and her manager already has a wish list for other applications with similar functionality. You're going to become quite popular soon.

The only thing left to do now is find a way to automate all of this redundant code for building the stored procedures, data classes, and business classes. As you've probably noticed, most ...

Get ASP.NET 3.5 Enterprise Application Development with Visual Studio® 2008: Problem - Design - Solution now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.