Transactionscope/Multiple result Set in common framework

Topics: Building and extending application blocks, Data Access Application Block
Jul 21, 2010 at 5:22 AM
Edited Jul 21, 2010 at 5:23 AM


We are building a custom framework which supports the database operations and returns the results specific to our requirement.

1. Transactionscope:

The requirement is in some cases we may need to support transactions and in other cases we may not.

We have our custom datamanager which supports the operations we need. Currently it does not support Transactions.

How will I have my custom framework support this i.e. When will I create a transaction and when will i commit. How will I define the scope.


2. Returning Multiple result set:

Currently the way framework is desinged is developer calls a framework method say GetList<T>, framework executes the command and parses the result set and send the list of entity of Type T.


Framewrok GetList method:

List<T> entityList = new List<T>();

using (IDataReader reader = Database.ExecuteReader(command))


while (reader.Read())


entityList.Add(entityBuilder.Construct(reader)); //We build the entity here



But how will I support returning multiple result set?


Jul 21, 2010 at 9:05 AM

I'm afraid I really don't know what is the specific entlib question you have here or am I just missing something.

For your item #1, are you pertaining on how to implement TransactionScope with DAAB? If yes try checking out the documentation regarding Using the TransactionScope Class.For item #2, is what you need here is MARS implementation? Again, if yes you can check this article

Gino Terrado
Global Technology and Solutions
Avanade, Inc.