Event Listeners

There are 1 entries for the tag Event Listeners
NHibernate: IPreInsertEventListener

Poco tempo fa ho parlato di strategie di generazione del document identifier con NHibernate, quello che vogliamo ottenere è rendere trasparente all’utilizzatore il fatto che un “id”, ad esempio il numero fattura, debba essere generato e dipenda da fattori esterni all’entità. In soldoni vogliamo limitarci ad una cosa del genere: using( var dc = this.dataContextFactory.Create() ) { using( var tx = dc.BegingTransaction( IsolationLevel.Serializable ) ) { dc.Insert( myEntity ); tx.Commit(); } } nel post di...

posted @ venerdì 30 ottobre 2009 11:00 | Feedback (0)