|
-
Oct 31st, 2006, 04:19 AM
#1
Thread Starter
Lively Member
[2.0] Transaction/design question
Hi,
I've got a app layer that feeds a 'Country' object to by business layer.
A country object consists of some values and a collection of Region objects.
A region object consists of some values and a collection of City objects.
A city object only consists of some values.
In my business layer I would disassemble the country object and pass all the information to my data layer, where I use 3 methods:
AddCountry(...);
AddRegion(...);
AddCity(...);
Now, I'd like to use transactions so either ALL the information is inserted in the sql server db or NONE.
My question, how would I implement this?
I suppose I can't use transaction stuff in my business layer, but I wouldn't know how I'd use transactions in my DAL since the inserts are seperated between 3 methods.
Maybe I'm doing this all wrong, I don't know. But any feedback would be appreciated. :-)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|