Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Instantiating and using two instances of the same BO
Message
From
16/07/2009 10:45:39
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
 
 
To
16/07/2009 09:00:38
Tegron Tegron
Platinum Technologies
Ohio, United States
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Environment versions
Environment:
ASP.NET
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01412544
Message ID:
01412708
Views:
27
>No I actually did subclass the BO, which then allowed me to see that object in the BO wizard to select for binding to my grid. I quickly wanted to test that solution out while trying to understand Linda's solution. In my case the subclassing was simple to implement quickly, and it accomplished exactly what I needed.
>
>Tim's response did get me to thinking though. From a object oriented or design pattern standpoint, shouldn't I be able to have two different instances of an object that contained different data? In this case wouldn't you want to subclass the object?

The business object isn't the data. You can get different sets of data via the same business object. In the case like yours the best approach was to just return your data in different table names such as what Linda suggested. You can also call the busines object to get you a entity list to bind to your first control and then call the businnes object again to get a entity list for the second control. The only issue with this would be if you need both to be active on the business object at the same time. In a web application that isn't going to be an issue at all.
Tim
Timothy Bryan
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform