It really depends on what you are accomplishing. One idea is to have the role
membership null until you are actually pulling members of a role. For person,
you can do the same thing with roles, but it is not as critical if one can be
nullable.
You can work with objects that wrap DataSets to avoid some of the
complexity, but that would be slightly different than the suggestions in the
article.
Hope this helps, as I feel I am rambling a bit right now.
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
***************************
Think Outside the Box!
***************************
"Tom B" wrote:
> Hello all,
>
> I just read Karl Seguin's article "On the Way to Mastering ASP.Net:
> Introducing Custom Entity Classes"
> http://msdn.microsoft.com/library/de...CustEntCls.asp
>
> I realize it's about ASP.Net, but figured the same principles apply for
> Windows Form classes..
>
> Here's my question/problem
>
> In the article he refers to a Person class and a Role class. Since a person
> could have several roles, an array of Roles is in the Person class.
>
> SO.... what about the fact that Roles would contain many Persons. If I load
> a Person class with all of its roles (in the constructor) and load all of
> the persons within the roles constructor it will go on forever.
>
> How is this handled? Is this where the lazy load stuff I've heard of comes
> from?
>
> Thanks in advance.
>
> Tom B
>
>
>