Webcast: Building your own block with Enterprise Library for .NET 2.0

Via Brian (because I can't be bothered paraphrasing the same content 🙂

This Thursday, Tom Hollander and I will be presenting a web cast on building your own application block using Enterprise Library January 2006. The talk will discuss how to take a piece of functionality that you have built and plug it into the configuration system, so that it can be constructed using our provider-based factories.

The topics will include:

  1. Building the simplest Application Block possible
  2. Attaching configuration to the block
  3. Allowing for variability through custom providers
  4. Creating your own configuration objects for your providers

And if time allows, I’ll be discussing how to create and attach instrumentation to your new application block.

The webcast will be on Thursday February 9th at 11:00 US Pacific time / 19:00 UTC. Click here to register before the event, or to view on demand later.

Update: The webcast is over now - thanks to all of those who attended and asked some great questions. You can still watch the webcast on-demand, and Brian has now posted the sample code that he demonstrated during the webcast.

Comments (9)
  1. John Yung says:


    I am using TransactionScope and Data Access Block 2.0 to manage distributed transactions. The following is my code:

    using (TransactionScope transScope = new TransactionScope()) {

    using (DbConnection conn_saccorpaction = _dbsaccorpaction.CreateConnection()) {


    try {

    _dbsaccorpaction.ExecuteNonQuery(CommandType.Text, "exec sacprg.p_SACt_Insert " + txtPKey.Text);

    } catch {



    using (DbConnection conn_sacdetails = _dbsacdetails.CreateConnection()) {


    try {

    _dbsacdetails.ExecuteNonQuery(CommandType.Text, "exec sacprg.p_SACt_Insert " + txtPKey.Text);

    } catch {





    transScope.Complete(); //  The Complete method commits the transaction.


    My concern is since I am not explicitly setting the connection object to be use to execute all those SQL commands, is it possible for _dbsaccorpaction or _dbsacdetails to use another connection to execute those SQL commands?

    What happens if another thread is using the same database object to execute other SQL commands?


    John Yung

  2. Ravi K Pasumarthy says:


    Currently i’m using VistaDB (embedded database) and its .net data provider in my project. And in the future we may be moving to sql server, now i have to write data access layer that is not dependent on the database, so i have choosen to use enterprise DAAB, but i dont know how to customize (pluging my vistadb classes) into enterprise library so that if i code this way database.createdatabase() will return vistadatabase. If you have any sample codes or articles that can explain the above scenario. It will be helpful for me.

    Thanks and Regards,

    Ravi K Pasumarthy,

    CCH, a Wolters Kluwer business,


  3. Jonathan George says:

    Hi, The link to the web cast doesn’t appear to be correct – it points to a web cast on the configuration block. Any chance of fixing it, as I’d very much like to get hold of the presentation.



  4. Hi Jon –

    The link is correct but the title on the webcast site is wrong. I’ll see if we can get this fixed.



  5. Harjeet says:


    Anybody knows "How to set command timeout while using ‘Data Access Application Block’ " ?

    Please try to reply to harjeet.bhatia@opussoft.com

    Thanks & Regards,

    – Harjeet

  6. Sid D H Arthur says:

    Slightly off-topic I know, but I would like to know if there are a performance degradation when using the Application Blocks? In particular, I’m thinking if there is a performance hit when Instrumentation (perfmon) is turned on for an application that is using the EAB2.

  7. Khuzema says:


    Is there any plan to update User Interface Process Application Block for Framework 2.0 and/or a reference application which includes both UIP and EntLib 2.0.

    If this is not right place for this info can you kindly point to site/community where i can send my comments.

    thanks & regards

  8. Ramil says:


    Is there a VB.NET version of this example code on how to create your own application block using Enterprise Library 2.0 January 2006?


  9. Sorry all for the slow responses – I’ll explain why in my next post 🙂

    Sid: The performance profile of the EntLib v2 blocks is slightly different from the v1 blocks, mainly due to the change of configuration system and the introduction to ObjectBuilder. The "initial hit" to all blocks should now be much faster than in v1. The performance of subsequent calls varies depending on the block and configuration – although most blocks are slightly slower with instrumentation enabled but quicker with it disabled. Logging is quicker across the board. As always, you should run tests that reflect your environment and requirements to see if the blocks meet your performance goals.

    Khuzema: There are plans to update UIP – I know we’ve been saying that for a while but it’s still in the plans. The owner of this is now Eugenio Pace (http://blogs.msdn.com/eugeniop) so look out for details on his blog.

    Ramil: Sorry, not at this time. However the concepts demonstrated all apply to VB.NET as well as C#.


Comments are closed.

Skip to main content