Reputation: 13
I'm trying to persist the datetime of creation and update of entites (not relevent to versioning and concurrency) using fluent nhibernate.
To achieve this using nhibernate I would write this mapping tag:
<timestamp name="Timestamp" access="property" unsaved-value="null" />
How can I make fluent nhiberbate generate that mapping tag?
Upvotes: 0
Views: 828
Reputation: 2879
If you mean map a DateTime
property as this:
<property name="Timestamp" type="Timestamp"/>
This is the equivalent in Fluent NHibernate:
Map(x => x.Timestamp).CustomType<TimestampType>();
Upvotes: 1