Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Multiple tables in BizObj?
Message
From
06/04/2009 12:51:06
 
 
To
06/04/2009 10:49:08
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Environment versions
Environment:
C# 3.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01392599
Message ID:
01393491
Views:
45
Thanks Tim,

If you have multiple backend tables in a single business object as you suggest, how do you save changes to all the related tables in a single transaction? The standard Mere Mortals Save button causes the primary table in the business object to be saved, so at what point do you call the save methods for the other tables?

Sam

>Hi Sam,
>
>I also use similar methods to do this as Linda stated. When I have a need for data that looks similar or exactly the same, I will often put that data in the same table and then just add a column to distinguish it. For instance I have a table in an application called DisplayItems which contains both news and events. The columns I wanted were the same so I just put both types of data in the same table and added a column called Type (being either News or Event). I have displayed both News and Events on the same web page but in different grids and call the data seperatly as Linda stated.
>
>To your question about multiple back end tables for the same business object. I have my own theory about this and may be all wet but to me a business object should relate to a real world Entity (not the individual row entity). So if I have a real world Entity which data normalization suggests should be made up of two different tables with a one to one relationship. Why shouldn't these be part of the same business object? My theory is they could be. To that end, the MM framework is not geared to this, but has the functionality to do it. When I say not geared to it I mean the Business Layer Generator for instance creates a business object for a given table. Additionally there are table name properties and such that are a bit on a one to one basis. This does not prevent one from creating this situation and if you are using views or stored procedures, then you have it mostly whipped anyway. So the idea would be a business object in my opinion should relate to a real world business entity regardless of the number of tables.
>Tim
>
>>Questions: Could multiple DataSets retrieved from the same backend table all be used to update the table? If so, how would you call the Save method etc. Your example uses only 1 backend table, but I wonder if there is a real world need for using multiple backend tables in 1 business object?
>>
>>I am struggling to get the big picture of the Mere Mortals framework. Any help is appreciated.
>>
>>Sam
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform