Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Entity from multiple tables
Message
From
21/05/2010 13:35:19
Guy Pardoe
Pardoe Development Corporation
Peterborough, New Hampshire, United States
 
 
To
21/05/2010 13:14:39
Antonio Llano
Inmollano S.L.
Getxo, Spain
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01465461
Message ID:
01465484
Views:
41
Hi Antonio,

Am I correct that I must do this in code, myself. What I mean is the BLG won't do this for me, right?

Guy



>Hi Guy,
>
>I use this features in an App now. If you want to use Entities and do it in the Business Layer, you should create a new Public property for your Entity and lookup through objects. The entity has a GetBusinessObject() Method in order to get the Entity´s Business Object, and the Business Object has a ParentBizObj property, so you can define in your invoice Entity something like:
>
>public string CustName
>{
>    get
>    {
>        string custName = ""
>        InvoiveObj invObj = this.GetBusinessObject() as InvoiceObj;
>        if (invObj != null)
>        {
>            if (invObj.ParentBizObj != null)
>            {
>                CustomerObj custObj = invObj.ParentBizObj as CustomerObj;
>                if (custObj != null && custObj.Entity != null) custName = custObj.Entity.CustomerName;
>            }
>        }
>        return custName;
>    }
>}
>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform