Replies: 2 comments 1 reply
-
I have not checked what was the state of the dynamic proxy code back in NHibernate v3.1.x, but it seems the assembly naming has changed since then, be it with the now obsolete dynamic proxy or with the current static proxy. nhibernate-core/src/NHibernate/Proxy/NHibernateProxyBuilder.cs Lines 50 to 51 in 07ecb9f So usually, if the proxied entity class is named Entity , the proxy assembly will be named EntityProxyAssembly .
For the dynamic proxy, it is here, and that is doing the same thing, just with an older syntax: nhibernate-core/src/NHibernate/Proxy/DynamicProxy/ProxyFactory.cs Lines 81 to 82 in 07ecb9f Will it be enough for your case? I have no idea. I do not think relying of |
Beta Was this translation helpful? Give feedback.
-
Internal entity classes should be supported in 5.4 (#2568). So as an option you can try to use 5.4 development builds (afaik it's in pretty stable state right now): https://www.myget.org/feed/nhibernate/package/nuget/NHibernate Note: It doesn't work with .net standard. Use .NET Core/.NET Framework NHibernate versions to make it work. |
Beta Was this translation helpful? Give feedback.
-
Hello,
I would like to ask you if you know how to use .Net InternalVisibleTo with NHibernate 5.3.x
I need to upgrade project using NHibernate 3.1.x to NHibernate 5.3.x. I have already made a lot of changes in the code, and the project is partly working well, but I need to find a workable solution for the InternalVisibleTo. Because the project is composition of several assemblies and some hbm.xml files and related classes has an internal modifier. I need the internal class to be visible for the NHibernate also.
Our old project was using [assembly: InternalsVisibleTo( "DynamicAssemblyProxyGen, PublicKey=002400..... this caused that the internal classes were visible for a proxy factory. But this dynamical assembly seems not to be supported in the version 5.3.x.
I decided to use StaticProxyFactory with NHibernate 5.3.x. Could you please let me know how to amend InternalVisibleTo command?
Thank you very much for help.
Beta Was this translation helpful? Give feedback.
All reactions