O'Reilly logo

Learning NHibernate 4 by Suhas Chatekar

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

Feature 1 – onboarding an employee

In our problem statement, we did not clearly define what happens when a new employee joins. We would detail that out now so that we have something meaningful to work with. Let's say, the following needs to happen when a new employee joins:

  • Employee is awarded 21 sick leaves and 24 paid leaves
  • A skill enhancement allowance of £1,000 is allocated
  • Employee record is saved in database

First two items are clearly a part of business logic. We can say that this logic can live within the Employee class. Third item is not a domain concern but more of an infrastructure concern. So we would want to push it out to one of the outer layers of onion architecture. It is difficult to say which layer this items belongs to exactly. ...

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