Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Should Entities refer to fields from related tables?
Message
From
28/05/2010 17:06:42
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
 
 
To
28/05/2010 13:34:29
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01466424
Message ID:
01466446
Views:
38
Hi Frank,

>Hi,
>
>I have a Clients table and a Policies table. A client can have one or many policies. When displaying a single Policy I want to display some of the client details like Name and Number. Should I set Client as a child business object of Policy, or should I include the related fields in the Policy entity?


My personal opinion is that Entity objects should not contain properties from other entities. You can easily once you have the policy entity, just call the client biz obj to get the specific fields for the specific record you are working with and bind those to whatever controls you are displaying in. I would guess they would need to be read only. But if the policy record navigates then you need to also re-query the client table for related values.
Tim
Timothy Bryan
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform