Hello,
I know this is not directly a NHibernate question, but I think there are a lot of people here which had the same problem and could point me in the right direction.
Imagine the following:
Code:
public class A
{
public String FieldA;
}
public class B
{
public A a;
public String FieldB;
}
public class C
{
public B b;
public String FieldC;
}
This is a simple 1:n relationship. If I now want to bind Class C to any Control I can just access FieldC. b is an object and I can't bind that to control.
The only way I can imagine doing something like is extending class C:
Code:
puglic class C
{
public B b;
public String FieldC;
public String bValue { get { return b.FieldB; } set { b.FieldB = value; } }
public String aValue { get { return b.a.FieldA; } set { b.a.FieldA = value; } }
}
but this looks a bit clumsy in my eyes and also it isn't a very nice design.
Another way would be to transform class C into a class visualizerC, though doing this everytime I want to show it can also get a bit frustrating.
Anybody got a tip or a best practice how to solve this?
Thanks for you help!!!!
Greetings Reflection