Hello, I´m trying to get started in the “DDD with C#” world.
I use NHibernate as my ORM tool, thus trying to develop a
PI(Persistence Ignorance) model.
However, in some of my entities (which are being represented as POCOS)
I have  business rules in the setters of my properties.
For example, I have a “User” entity which have a flag that indicates
if this user is blocked or not, when this flag is true a second field
called “Block Date”
 must be automatically filled whith the current date.
Everything seems very clear and simple, but the problem arises in the
moment that I´m recovering users that has already persisted in the
database, even though
the blocked users will have their “Blocked Dates” update to the
current date, according whit this logic.
Initially I thought in a second flag “isLoaded” that would indicates
that the object is being hydrated by NHibernate and then this logic
wouldn´t be launched,
 however this didn´t seem like PI. Any suggestion on how to improve
this?

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to