It took one down. As a result, look at the code of others, but how it is. . Always die in addassembly. That's what this addassembly is done. After you can't get it, you find that you can't find this O / R mapping. I have written a similar set when I have bored, but. Looking at the features of the NHibernate, even if it can only be said to be a lightweight, it is only a simple conversion of O / R, and Factory, which is connected to multiple DB. However. It seems that many smart don't have to write what XML is configured. Do not do the right image reflection, huh, efficiency should be much higher. Still first, let's write the current situation, or die in addassembly here, I really don't know what this is doing, why not, I haven't found it, I check it, I use embedded resources and so on. Let me know. It is also said that only QuickStart is written so soil, and it is ok to run the NUNIT. I forgot to explain it, I wrote a DLL alone. Give another program to call Public Class MyTest Dim CFG AS New Configuration Dim Factory as ISessionFactory Public Function GetUserbyName (Byval Name As String) AS User Dim Session as ISession = Factory. OpenSession () DIM uu as user 'DIM trx as itransaction = session.begintransaction () uu = ctype (session.load (gettype (user), name), user session.close () return uu end function
Public Sub New () cfg.addassembly ("NHIBERNATE.EXAMPLES.VB") 'cfg.addclass (gettype (user)) Factory = cfg.buildsessionFactory () End Sub End Class This error USER.HBM.XML is also