Skip to content

Instantly share code, notes, and snippets.

@andreasohlund
Created October 12, 2010 12:18
Show Gist options
  • Save andreasohlund/622088 to your computer and use it in GitHub Desktop.
Save andreasohlund/622088 to your computer and use it in GitHub Desktop.
public class NHibernateMessageHandler:IHandleMessages<NHibernateMessage>
{
readonly ISession session;
public NHibernateMessageHandler(ISession session)
{
this.session = session;
}
public void Handle(NHibernateMessage message)
{
session.Save(new PersistentEntity
{
Data = "Whatever " + DateTime.Now.ToShortTimeString()
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment