I specifically used two different transactional techniques -
EnterpriseServices for Project and ADO.NET for Resource - to illustrate
how each works.
The reason is that there's a 50% performance hit to using
EnterpriseServices transactions, and if you are only updating a single
database you may want to avoid that cost by using ADO.NET transactions.
Both the Projects and Resources objects are read-only collections. In
neither case would you typically use transactions.
Both the Project and Resource objects have collections of child objects.
In both cases you would typically use transactions.
If you look at the code for Project (and its child classes) you'll see
that it uses EnterpriseServices 2-phase distributed transactions (COM+).
The way this works is simplified due to code I created for CSLA .NET,
and it is fully explained in the book.
If you look at the code for Resource (and its child classes) you'll see
that it uses ADO.NET transactions. The way this works is fully explained
in the book.
The result is that updating Resource objects is about twice as fast as
updating Project objects.
For more information about when and how to use EnterpriseServices (COM+)
in .NET go here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnadvne
t/html/vbnet02112003.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnadvne
t/html/vbnet02112003.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnadvne
t/html/vbnet02112003.asp
Rocky
> -----Original Message-----
> From: Eric [mailto:ericbrandes@h...]
> Sent: Friday, March 07, 2003 4:18 AM
> To: expert_vb_business_objects
> Subject: [expert_vb_business_objects] transactions and CSLA.NET
>
>
> Rocky,
>
> I've been looking through the code for CSLA.NET as well as
> the Projects
> sample application. In the Resources object, which has no
> children, you
> explicitly create a transaction when modifying the data
> source, but in
> the Projects object, where there are children, you use the
> Transactional
> attribute. My question is: How can the CSLA.NET support
> transactions in
> objects that have children without using Enterprise Services
>
> Eric
>