Thanks for reply,
i have started to work on NHibernate Quick start. I am able to insert record into database but i am having some issue related to loading data from database on the basis of id . but if i use get() method to get data then it is working.
going through this ==>
http://www.hibernate.org/362.html
This is not working
User joeCool = (User)session.Load(typeof(User), "joe_cool1");
getting this exception :
*************
System.TypeLoadException: Access is denied: 'HiberateNetLayer.User'.
at System.Reflection.Emit.TypeBuilder.TermCreateClass(Int32 handle, Module module)
at System.Reflection.Emit.TypeBuilder.CreateTypeNoLock()
at System.Reflection.Emit.TypeBuilder.CreateType()
at Castle.DynamicProxy.Builder.CodeBuilder.AbstractEasyType.BuildType()
at Castle.DynamicProxy.Builder.CodeGenerators.BaseCodeGenerator.CreateType()
at Castle.DynamicProxy.Builder.CodeGenerators.ClassProxyGenerator.GenerateCode(Type baseClass, Type[] interfaces)
at Castle.DynamicProxy.Builder.DefaultProxyBuilder.CreateClassProxy(Type theClass, Type[] interfaces)
at Castle.DynamicProxy.ProxyGenerator.CreateClassProxy(Type baseClass, Type[] interfaces, IInterceptor interceptor, Boolean checkAbstract, Object[] argumentsForConstructor)
at NHibernate.Proxy.CastleProxyFactory.GetProxy(Object id, ISessionImplementor session)
A first chance exception of type 'NHibernate.HibernateException' occurred in NHibernate.dll
*************
This is working
User joeCool = (User)session.Get(typeof(User), "joe_cool1");
can anyone tell me reason for this as well as solution?
Regards,
Jigar