Static Proxies for NHibernate using PostSharp

by Gael Fraiteur on 10 Oct 2008

Ayende Rayen has just implemented 'static proxies' for NHibernate using PostSharp.

NHibernate is a well-known O-R mapper. One of the features, lazy loading of properties, previously required you to make all properties virtual. The reason is that the properties were "enhanced" (understand: subclassed) at runtime using AOPish techniques. With PostSharp, Ayende now enables lazy loading even.

Ayende did the job in 4 hours:

The first thing that I have to say is wow Post Sharp rocks! And I mean that as someone who is doing AOP for a long while, and has implemented some not insignificant parts of Castle.DynamicProxy. Leaving aside the amount of power that it gives you, PostSharp simplicity is simply amazing, wow!

The feature is now pre-alpha only, but "it works". For more info please refer to Ayende's blog or contact him.

Happy PostSharping!