My code is based on the SharpArchitecture code, Tomasz Pluskiewicz
already posted the link to it.

The only big difference is my implementation of
BaseObject.GetTypeUnproxied(). The trick that SharpArchitecture is
using only works for Castle, but not for LinFu. I'm using the
following code to get the underlying type of a LinFu proxy:

public static Type GetUnproxiedType(Type type) {
         while (type.Assembly.IsDynamic && type.BaseType != null) {
            type = type.BaseType;
         }

         return type;
      }

On Mar 9, 11:01 am, turibbio <[email protected]> wrote:
> Thanks all of you for the answers!
>
> @Francois: great tips!
>
> @cremor: I think that's my case, do you have a snippet of code?
>
> On 9 Mar, 10:44, Tomek Pluskiewicz <[email protected]> wrote:
>
> > You could also have a look at SharpArchitecture's 
> > implementation:https://github.com/sharparchitecture/Sharp-Architecture/tree/master/s...
>
> > Check out the Entity and BaseObject classes
>
> > On 9 Mar, 07:45, cremor <[email protected]> wrote:
>
> > > Be careful with this implementation if you don't use GUID for the Id.
> > > For Ids of type int (or similar) you should also compare the type of
> > > the objects (and include the type in the hash code calcualtion).
>
> > > On Mar 8, 2:19 pm, turibbio <[email protected]> wrote:
>
> > > > Thank you!
>
> > > > On 8 Mar, 13:54, Kenneth <[email protected]> wrote:
>
> > > > >http://blogs.hibernatingrhinos.com/nhibernate/archive/0001/01/01/iden...Nascondi
> > > > > testo citato
>
> > - Mostra testo citato -
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to