Devildog74 wrote:
Question 1. Do you build prefetch paths, relationship predicate buckets, sorts, filters, etc. into your derived criteria object?
Short answer; YES.
For the BL classes that manage single entities, the derived criteria class has 3 constructors:
- New(primaryKeyFields of entity)
-
New(primaryKeyFields of entity, prefetch)
-
New(entityToSave, childEntitiesToDelete)
For BL classes that manage collection of entity, the derived criteria class has 2 constructors:
- New(bucket, numberOfRecordsToReturn,
sorter, prefetch)
-
New(bucket, numberOfRecordsToReturn,
sorter, pageNumber, pageSize)
Devildog74 wrote:
Question 2. Do you interfact with an instance of a DataAccessAdapter in the DataPortal_XYZ method written in the Business Object , OR do you have a manager class that you call into from the DataPortal_XYZ method?
I don't exactly understand what you mean by this. I only interact with the DataAccessAdapter inside the DataPortal_XYZ method. I have factory class that creates my DataAccessAdapters.
Devildog74 wrote:
Question 3. How have you implemented concurrency in your business objects using the concurrency model supported in LLBLGen?
I use optimistic concurrency using entity's ConcurrencyPredicateFactoryToUse property. The filter factory for this property is created from a private embeded class.
Devildog74 wrote:
Question 4. How do you get transaction context from the CSLA Runtime to the DataAccessAdapter? Cant you just pass the transaction context generated in the CSLA runtime to the DataAccessAdapter?
CSLA2 supports 3 models of transactions; serviced using enterprise services, scoped using .NET2.0's TransactionScope and simple using ADO.NET's transaction.
Because LLBL makes using transactions much easier and effecient than directly using them from ADO.NET (specially when using UnitOfWork) I opted not to use CSLA's scoped transaction model. So, if I am not using COM+ transactions I would be calling into CSLA's SimpleDataPortal.