RE: Transaction spanning multiple business classes
- From: "Jakob Christensen" <jch@xxxxxxxxxxxxxxxx>
- Date: Wed, 1 Jun 2005 23:43:01 -0700
Implementing UnitOfWork and the related patterns (e.g. datamappers) is
probably not something you can do in a matter of minutes. I have tried
googling for some samples without any luck.
If you are in a hurry and do not have time to read through Fowler's book,
you might just opt for the easy solution and pass a reference to a
transaction object as a parameter. Another fairly easy solution is to
register a transaction object using some kind of Registry pattern and then
let the Insert and Update methods access the registry using a unique ID to
get a hold of the transaction. But the transaction would still have to
started by your business logic. Fowler also describes the Registry solution.
HTH, Jakob.
--
http://www.dotninjas.dk
"Klenne" wrote:
> Hi Jakob
>
> I know the patterns a little bit but i can't seem to get started
>
> How would i implement this given the scenario i'm in?
>
> Thanks for the help!!!
>
> > > public class PersonService
> > > {
> > > public void InsertMailingAddress(data)
> > > {
> > > //ask the AddressService to insert an address
> > > new AddressService().InsertAddress();
> > >
> > > //update the person with the ID from the newly inserted address
> > > }
> > > }
>
.
- References:
- Transaction spanning multiple business classes
- From: Klenne
- RE: Transaction spanning multiple business classes
- From: Jakob Christensen
- RE: Transaction spanning multiple business classes
- From: Klenne
- Transaction spanning multiple business classes
- Prev by Date: Re: Exit Code 67
- Next by Date: ASP.NET lock up
- Previous by thread: RE: Transaction spanning multiple business classes
- Next by thread: Exit Code 67
- Index(es):
Relevant Pages
|