Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Populating foreign keys
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
00810787
Message ID:
00811890
Views:
12
Brian,

>Okay, I see how that will allow the parent business object to save it's dataset. But if I have child business objects that are supposed to be saved automatically by the parent, how would this work? It seems as though you would also have to somehow get the child datasets from Session and put them back into their respective business objects or the parent would not be able to automatically save it's children.

You're on the money...if you want to use automatic saving features of MM .NET in ASP.NET, since the Web is stateless, you'd need to restore the parent and child persisted DataSets before calling the parent's SaveDataSet method.

To do this in the child object, you need to call SetCurrentDataSet, passing a reference to the persisted DataSet. Since this method is currently protected (It will be public in the next release), you can create a public method on your business object that in turn calls SetCurrentDataSet.

Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Previous
Reply
Map
View

Click here to load this message in the networking platform