O'Reilly logo

NHibernate 3 Beginner's Guide by Gabriel N. Schenker

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Summary

We learned a lot in this chapter about how important it is to always validate the data our application produces and works with.

Specifically, we covered:

  • How to use attributes to decorate the properties of the entities in the domain model and use the added metadata to validate those entities.
  • The usage of always valid entities and value objects. We learned that this convention cannot only be used to validate data that the users enter into the system, but also to significantly reduce the complexity and size of our code base.
  • How to address more complex validation requirements by using special validator classes. By implementing classes that have only the responsibility of validating the data entered by the users, we follow the single responsibility ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required