I have seen countless discussions on this forum where the [Confusion] of designing Business Entities aka Custom Business Entities aka DTO lingers on. Even right now there are many question posted pertaining the same subject. Designing simple Custom Entities is stright forward but the UI needs are very peculiar. If Entity-A holds a link to Entity-B it works fine for a simple screen; however, the problem arises when the UI needs to display Entity-B including [Name] of Entity-A. Since Entity-B only holds a link (without other details) to Entity-A, the user is either forced to include the [Name] of Entity-A in Entity-B as a property or has to define an entirely new Entity-C which is a merger of the Entity-A and Entity-B.
IMO, Custom Business Entities should be [Logically] classified into two [Layers]. One layer should represent the [Core] Business Entities (business domain) while the other represents [Need-Based] Entities. The need-based entities should conform to UI or other needs (such as reporting). For example, the following Custom Entities represent the main business domain:
Customer (CustID, CustName, ...), Order (OrdID, Date, ...) , Product (ProID, ProName, Price, ...) ----- [Core] Business Entities
But the UI may need to display Which Customer bought Which Product (without order details). For such a need, we can have the following need-based entity:
CustomerProductPurchase (CustID, ProID, CustName, ProName, Price, ...)
This is just my opinion. I see the pros and cons of this architecutre BUT would like to hear from the experts...
Thanks..