Tuesday, May 12, 2009

About CProxyType*_NHibernate_ProxyINHibernateProxy_System_Runtime_SerializationISerializable2

Are you getting this exception while debugging on Visual Studio?
CProxyType*ENTITY_FULL_NAME*_NHibernate_ProxyINHibernateProxy_System_Runtime_SerializationISerializable2

Are you worried? Are you banging your head? Don't worry now, I have a solution for you! Follow as described below (step by step):
Step 1. Stop Debugging. Sometime NHibernate doesn't load lazy loaded entity during debug (specially in 'watch' or 'quick watch'). Test your code at runtime like Message Pop-up box or Console.Write etc
Step 2. Take a cup of tea.