<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="/rss.xsl"?><rss version="2.0"><channel><title>entlib Forum Rss Feed</title><link>http://www.codeplex.com/entlib/Project/ListForums.aspx</link><description>entlib Forum Rss Description</description><item><title>New Post: DatabaseFactory.CreateDatabase problem in DAAB 6.0</title><link>http://entlib.codeplex.com/discussions/443547</link><description>&lt;div style="line-height: normal;"&gt;Hi Randy! :)&lt;br /&gt;
&lt;br /&gt;
I have included the following line in a static constructor in my class:&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;DatabaseFactory.SetDatabaseProviderFactory(new DatabaseProviderFactory());&lt;/code&gt;&lt;/pre&gt;

... and everything works fine as usual.&lt;br /&gt;
&lt;br /&gt;
Thank You :)&lt;br /&gt;
&lt;br /&gt;
Hugs,&lt;br /&gt;
Serena&lt;br /&gt;
&lt;/div&gt;</description><author>firedancer</author><pubDate>Tue, 21 May 2013 06:38:24 GMT</pubDate><guid isPermaLink="false">New Post: DatabaseFactory.CreateDatabase problem in DAAB 6.0 20130521063824A</guid></item><item><title>New Post: Entlib6 DAAB - Using accessors to execute stored procedures with optional parameters?</title><link>http://entlib.codeplex.com/discussions/443904</link><description>&lt;div style="line-height: normal;"&gt;&lt;strong&gt;BBauer42 wrote:&lt;/strong&gt;&lt;br /&gt;
&lt;blockquote&gt;
Prior to your code sample you say I can &amp;quot;use parameter names and not set the optional parameters&amp;quot;. Do you have an example of this? Is it possible or am I misinterpreting your response? &lt;br /&gt;
&lt;/blockquote&gt;
I was just listing the ways in general on how to invoke stored procedures with optional parameters.  My example shows how to to this following the pattern used by accessors.&lt;br /&gt;
&lt;br /&gt;
Of course, there are many ways to get where you want to go.  Another way would be to use the Enterprise Library mappers directly:&lt;br /&gt;
&lt;div style="color:Black;background-color:White;"&gt;&lt;pre&gt;
    DatabaseFactory.SetDatabaseProviderFactory(&lt;span style="color:Blue;"&gt;new&lt;/span&gt; DatabaseProviderFactory());

    Database db = DatabaseFactory.CreateDatabase();

    &lt;span style="color:Blue;"&gt;using&lt;/span&gt; (DbCommand cmd = db.DbProviderFactory.CreateCommand())
    {
        cmd.CommandText = &lt;span style="color:#A31515;"&gt;&amp;quot;REPAIRTICKET_Select&amp;quot;&lt;/span&gt;;
        cmd.CommandType = CommandType.StoredProcedure;

        &lt;span style="color:Blue;"&gt;if&lt;/span&gt; (repairTicket != &lt;span style="color:Blue;"&gt;null&lt;/span&gt;)
        {
            db.AddInParameter(cmd, &lt;span style="color:#A31515;"&gt;&amp;quot;@RepairTicket&amp;quot;&lt;/span&gt;, DbType.String, repairTicket);
        }

        IRowMapper&amp;lt;REPAIRTICKET&amp;gt; mapper = MapBuilder&amp;lt;REPAIRTICKET&amp;gt;.BuildAllProperties();

        &lt;span style="color:Blue;"&gt;using&lt;/span&gt; (&lt;span style="color:Blue;"&gt;var&lt;/span&gt; reader = db.ExecuteReader(cmd))
        {
            &lt;span style="color:Blue;"&gt;while&lt;/span&gt; (reader.Read())
            {
                &lt;span style="color:Blue;"&gt;yield&lt;/span&gt; &lt;span style="color:Blue;"&gt;return&lt;/span&gt; mapper.MapRow(reader);
            }
        }
    }

&lt;/pre&gt;&lt;/div&gt;I would prefer to use ExecuteReader instead of ExecuteDataSet if you don't actually need a DataSet.&lt;br /&gt;
&lt;br /&gt;
~~&lt;br /&gt;
Randy Levy&lt;br /&gt;
&lt;a href="m&amp;#x61;&amp;#x69;&amp;#x6c;&amp;#116;o&amp;#58;&amp;#101;&amp;#110;&amp;#116;&amp;#x6c;i&amp;#x62;&amp;#x2e;&amp;#x73;&amp;#117;&amp;#x70;&amp;#x70;o&amp;#114;&amp;#x74;&amp;#64;&amp;#x6c;&amp;#105;v&amp;#101;&amp;#x2e;&amp;#99;&amp;#x6f;&amp;#109;"&gt;&amp;#x65;n&amp;#x74;&amp;#108;&amp;#105;&amp;#x62;&amp;#46;&amp;#115;&amp;#x75;&amp;#112;&amp;#112;&amp;#x6f;&amp;#x72;&amp;#x74;&amp;#x40;&amp;#x6c;&amp;#x69;&amp;#118;&amp;#x65;&amp;#x2e;c&amp;#x6f;&amp;#x6d;&lt;/a&gt;&lt;br /&gt;
Enterprise Library support engineer&lt;br /&gt;
&lt;a href="entlib.codeplex.com/wikipage?title=Support%20How-to" rel="nofollow"&gt;Support How-to&lt;/a&gt; &lt;br /&gt;
&lt;/div&gt;</description><author>randylevy</author><pubDate>Mon, 20 May 2013 15:41:09 GMT</pubDate><guid isPermaLink="false">New Post: Entlib6 DAAB - Using accessors to execute stored procedures with optional parameters? 20130520034109P</guid></item><item><title>New Post: Distributed Caching using Enterprise Library Caching Application Block W.O. using database</title><link>http://entlib.codeplex.com/discussions/355788</link><description>&lt;div style="line-height: normal;"&gt;The Caching Application Block has been retired in Enterprise Library 6.  Going forward the recommendation for caching in new applications would be, depending on the requirements, to use the .NET 4+ &lt;a href="http://msdn.microsoft.com/en-us/library/system.runtime.caching.aspx" rel="nofollow"&gt;System.Runtime.Caching&lt;/a&gt; or &lt;a href="http://msdn.microsoft.com/en-us/windowsserver/ee695849.aspx" rel="nofollow"&gt;Windows Server AppFabric Caching&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
~~&lt;br /&gt;
Randy Levy&lt;br /&gt;
&lt;a href="m&amp;#x61;&amp;#x69;&amp;#x6c;&amp;#116;o&amp;#58;&amp;#101;&amp;#110;&amp;#116;&amp;#x6c;i&amp;#x62;&amp;#x2e;&amp;#x73;&amp;#117;&amp;#x70;&amp;#x70;o&amp;#114;&amp;#x74;&amp;#64;&amp;#x6c;&amp;#105;v&amp;#101;&amp;#x2e;&amp;#99;&amp;#x6f;&amp;#109;"&gt;&amp;#x65;n&amp;#x74;&amp;#108;&amp;#105;&amp;#x62;&amp;#46;&amp;#115;&amp;#x75;&amp;#112;&amp;#112;&amp;#x6f;&amp;#x72;&amp;#x74;&amp;#x40;&amp;#x6c;&amp;#x69;&amp;#118;&amp;#x65;&amp;#x2e;c&amp;#x6f;&amp;#x6d;&lt;/a&gt;&lt;br /&gt;
Enterprise Library support engineer&lt;br /&gt;
&lt;a href="entlib.codeplex.com/wikipage?title=Support%20How-to" rel="nofollow"&gt;Support How-to&lt;/a&gt; &lt;br /&gt;
&lt;/div&gt;</description><author>randylevy</author><pubDate>Mon, 20 May 2013 15:00:29 GMT</pubDate><guid isPermaLink="false">New Post: Distributed Caching using Enterprise Library Caching Application Block W.O. using database 20130520030029P</guid></item><item><title>New Post: Entlib6 DAAB - Using accessors to execute stored procedures with optional parameters?</title><link>http://entlib.codeplex.com/discussions/443904</link><description>&lt;div style="line-height: normal;"&gt;Prior to your code sample you say I can &amp;quot;use parameter names and not set the optional parameters&amp;quot;. Do you have an example of this? Is it possible or am I misinterpreting your response? &lt;br /&gt;
&lt;br /&gt;
Also, it seems easier for me to just use something like ExecuteDataSet() and get the DataTable that was returned, then use AutoMapper to translate the table into a collection of objects. This is what I have in place now and is preferable to using the accessors thus far. Thanks.&lt;br /&gt;
&lt;/div&gt;</description><author>BBauer42</author><pubDate>Mon, 20 May 2013 12:12:44 GMT</pubDate><guid isPermaLink="false">New Post: Entlib6 DAAB - Using accessors to execute stored procedures with optional parameters? 20130520121244P</guid></item><item><title>New Post: Distributed Caching using Enterprise Library Caching Application Block W.O. using database</title><link>http://entlib.codeplex.com/discussions/355788</link><description>&lt;div style="line-height: normal;"&gt;Hi, and thanks for the post.&lt;br /&gt;
&lt;br /&gt;
But what about EF6, Is there any updates for AppFabric Cache Manager for EL6 ?&lt;br /&gt;
&lt;br /&gt;
Thanks &lt;br /&gt;
&lt;/div&gt;</description><author>murad_sun</author><pubDate>Mon, 20 May 2013 09:58:21 GMT</pubDate><guid isPermaLink="false">New Post: Distributed Caching using Enterprise Library Caching Application Block W.O. using database 20130520095821A</guid></item><item><title>New Post: MSEntlib6 finally out...</title><link>http://entlib.codeplex.com/discussions/444228</link><description>&lt;div style="line-height: normal;"&gt;I've been waiting very long time to see that, and here it is, a completely updated version, designed to integrate with the latest .NET features, much improving on features that already existed, and providing even more robust functionality for use with Windows Azure, WPF, WCF, and ASP.NET. There are very few other frameworks so mature and well designed.&lt;br /&gt;
&lt;br /&gt;
It'll take me some time to get up to speed with the new features, but as with previous versions, that time is well worth it. After a quick evaluation I'm gonna introduce it to my team for use with next major releases of our products.&lt;br /&gt;
&lt;br /&gt;
Thanks, Patterns and Practices team!&lt;br /&gt;
&lt;br /&gt;
Best Regards,&lt;br /&gt;
Piotr&lt;br /&gt;
&lt;/div&gt;</description><author>PiotrLuczak</author><pubDate>Sun, 19 May 2013 23:32:13 GMT</pubDate><guid isPermaLink="false">New Post: MSEntlib6 finally out... 20130519113213P</guid></item><item><title>New Post: Can a 3rd party library effectively use EntLib?</title><link>http://entlib.codeplex.com/discussions/444118</link><description>&lt;div style="line-height: normal;"&gt;Thanks for the pointers!&lt;br /&gt;
&lt;/div&gt;</description><author>r_keith_hill</author><pubDate>Sun, 19 May 2013 01:14:57 GMT</pubDate><guid isPermaLink="false">New Post: Can a 3rd party library effectively use EntLib? 20130519011457A</guid></item><item><title>New Post: Class LoggingExceptionHandler not present in version 5.0.505 ?</title><link>http://entlib.codeplex.com/discussions/444101</link><description>&lt;div style="line-height: normal;"&gt;What version of Enterprise Library were you upgrading from?  Are you seeing a runtime error executing the application?&lt;br /&gt;
&lt;br /&gt;
The LoggingExceptionHandler (or LoggingExceptionHandlerData for configuration) is contained in the assembly Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging so that assembly needs to be deployed.&lt;br /&gt;
&lt;br /&gt;
~~&lt;br /&gt;
Randy Levy&lt;br /&gt;
&lt;a href="m&amp;#x61;&amp;#x69;&amp;#x6c;&amp;#116;o&amp;#58;&amp;#101;&amp;#110;&amp;#116;&amp;#x6c;i&amp;#x62;&amp;#x2e;&amp;#x73;&amp;#117;&amp;#x70;&amp;#x70;o&amp;#114;&amp;#x74;&amp;#64;&amp;#x6c;&amp;#105;v&amp;#101;&amp;#x2e;&amp;#99;&amp;#x6f;&amp;#109;"&gt;&amp;#x65;n&amp;#x74;&amp;#108;&amp;#105;&amp;#x62;&amp;#46;&amp;#115;&amp;#x75;&amp;#112;&amp;#112;&amp;#x6f;&amp;#x72;&amp;#x74;&amp;#x40;&amp;#x6c;&amp;#x69;&amp;#118;&amp;#x65;&amp;#x2e;c&amp;#x6f;&amp;#x6d;&lt;/a&gt;&lt;br /&gt;
Enterprise Library support engineer&lt;br /&gt;
&lt;a href="entlib.codeplex.com/wikipage?title=Support%20How-to" rel="nofollow"&gt;Support How-to&lt;/a&gt; &lt;br /&gt;
&lt;/div&gt;</description><author>randylevy</author><pubDate>Sat, 18 May 2013 23:44:05 GMT</pubDate><guid isPermaLink="false">New Post: Class LoggingExceptionHandler not present in version 5.0.505 ? 20130518114405P</guid></item><item><title>New Post: Can a 3rd party library effectively use EntLib?</title><link>http://entlib.codeplex.com/discussions/444118</link><description>&lt;div style="line-height: normal;"&gt;The answer is that a 3rd party library can definitely use Enterprise Library.&lt;br /&gt;
&lt;br /&gt;
You are right -- the most complicated scenarios would be if the consuming application was also using Enterprise Library.  This isn't really specific to Enterprise Library but for all There are a variety of approaches that you could take to mitigate this issues such as installing in the GAC (multiple versions can live side by side in the GAC), &lt;a href="http://stackoverflow.com/questions/2460542/using-different-versions-of-the-same-assembly-in-the-same-folder" rel="nofollow"&gt;specifying the codebase&lt;/a&gt;, or a &lt;a href="http://entlib.codeplex.com/discussions/363098" rel="nofollow"&gt;custom assembly resolver&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Of course, this all adds complication if you want to support all potential scenarios (sometimes it's hard to know how people will use your library!).&lt;br /&gt;
&lt;br /&gt;
If your library is exposing the logging functionality externally (and not just using it internally for errors or tracing) then you should consider how that is done since you are imposing requirements (and dependencies) on your users.  You may consider letting users to bring their own logger but that implies knowing how to use all supported loggers (plus there could be other potential issues -- what if a user disposes of the logger you are using?).&lt;br /&gt;
&lt;br /&gt;
There is a project, &lt;a href="http://netcommon.sourceforge.net/" rel="nofollow"&gt;Common.Logging&lt;/a&gt;, which provides a common interface (as well as adapters) that supports Enterprise Library, log4net, and NLog.  That might help you since it sounds very similar to what you mention.&lt;br /&gt;
&lt;br /&gt;
~~&lt;br /&gt;
Randy Levy&lt;br /&gt;
&lt;a href="m&amp;#x61;&amp;#x69;&amp;#x6c;&amp;#116;o&amp;#58;&amp;#101;&amp;#110;&amp;#116;&amp;#x6c;i&amp;#x62;&amp;#x2e;&amp;#x73;&amp;#117;&amp;#x70;&amp;#x70;o&amp;#114;&amp;#x74;&amp;#64;&amp;#x6c;&amp;#105;v&amp;#101;&amp;#x2e;&amp;#99;&amp;#x6f;&amp;#109;"&gt;&amp;#x65;n&amp;#x74;&amp;#108;&amp;#105;&amp;#x62;&amp;#46;&amp;#115;&amp;#x75;&amp;#112;&amp;#112;&amp;#x6f;&amp;#x72;&amp;#x74;&amp;#x40;&amp;#x6c;&amp;#x69;&amp;#118;&amp;#x65;&amp;#x2e;c&amp;#x6f;&amp;#x6d;&lt;/a&gt;&lt;br /&gt;
Enterprise Library support engineer&lt;br /&gt;
&lt;a href="entlib.codeplex.com/wikipage?title=Support%20How-to" rel="nofollow"&gt;Support How-to&lt;/a&gt; &lt;br /&gt;
&lt;/div&gt;</description><author>randylevy</author><pubDate>Sat, 18 May 2013 15:47:49 GMT</pubDate><guid isPermaLink="false">New Post: Can a 3rd party library effectively use EntLib? 20130518034749P</guid></item><item><title>New Post: Can a 3rd party library effectively use EntLib?</title><link>http://entlib.codeplex.com/discussions/444118</link><description>&lt;div style="line-height: normal;"&gt;It seems that the appropriate place to use EntLib is at the application level. However if you're a 3rd party library ISV and would like to enable your library to do logging, is it possible to still use the EntLib Logging App Block?  Ironically, it is probably more of a problem if the consuming application also uses EntLib since the EntLib versions could be incompatible.&lt;br /&gt;
&lt;br /&gt;
I think one solution would be to define an ILogging interface in the library and then log to it instead of a specific logging framework.  The library would provide the user a way to plugin an adapter object that implements the interface (and that internally probably delegates to their choice of logging framework).  Is there something in EntLib that facilitates this scenario?&lt;br /&gt;
&lt;/div&gt;</description><author>r_keith_hill</author><pubDate>Sat, 18 May 2013 05:56:54 GMT</pubDate><guid isPermaLink="false">New Post: Can a 3rd party library effectively use EntLib? 20130518055654A</guid></item><item><title>New Post: Class LoggingExceptionHandler not present in version 5.0.505 ?</title><link>http://entlib.codeplex.com/discussions/444101</link><description>&lt;div style="line-height: normal;"&gt;Hi,&lt;br /&gt;
&lt;br /&gt;
When I changed de version of entlib in my application to 5.0.505 the following block in web.config started to complain that LoggingExceptionHandler doesn't exists.&lt;br /&gt;
&lt;br /&gt;
How this class changed between entlib versions ? What should I use to replace this class in the following block ?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;exceptionHandling&amp;gt;&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;exceptionPolicies&amp;gt;
  &amp;lt;add name=&amp;quot;GlobalExceptionLogger&amp;quot;&amp;gt;
    &amp;lt;exceptionTypes&amp;gt;
      &amp;lt;add type=&amp;quot;System.Exception, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&amp;quot; postHandlingAction=&amp;quot;None&amp;quot; name=&amp;quot;Exception&amp;quot;&amp;gt;
        &amp;lt;exceptionHandlers&amp;gt;
          &amp;lt;add logCategory=&amp;quot;General&amp;quot; eventId=&amp;quot;100&amp;quot; severity=&amp;quot;Error&amp;quot; title=&amp;quot;Enterprise Library Exception Handling&amp;quot; formatterType=&amp;quot;Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.TextExceptionFormatter, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling, Version=5.0.505.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35&amp;quot; priority=&amp;quot;0&amp;quot; type=&amp;quot;Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging.LoggingExceptionHandler, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging, Version=5.0.505.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35&amp;quot; name=&amp;quot;Logging Handler&amp;quot;/&amp;gt;
        &amp;lt;/exceptionHandlers&amp;gt;
      &amp;lt;/add&amp;gt;
    &amp;lt;/exceptionTypes&amp;gt;
  &amp;lt;/add&amp;gt;
&amp;lt;/exceptionPolicies&amp;gt;&lt;/code&gt;&lt;/pre&gt;

&amp;lt;/exceptionHandling&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thank you !&lt;br /&gt;
&lt;/div&gt;</description><author>DennesTorres</author><pubDate>Fri, 17 May 2013 21:57:43 GMT</pubDate><guid isPermaLink="false">New Post: Class LoggingExceptionHandler not present in version 5.0.505 ? 20130517095743P</guid></item><item><title>New Post: Retry logic for windows azure</title><link>http://entlib.codeplex.com/discussions/443840</link><description>&lt;div style="line-height: normal;"&gt;There are many resources  A good place to start is the &lt;a href="http://msdn.microsoft.com/en-us/library/hh680901(v=pandp.50).aspx" rel="nofollow"&gt;Developer's Guide -- Transient Fault Handling&lt;/a&gt;.  There is also a &lt;a href="http://channel9.msdn.com/Shows/Cloud+Cover/Episode-68-Throttling-in-SQL-Azure-with-Scott-Klein" rel="nofollow"&gt;video&lt;/a&gt; that has a demo.&lt;br /&gt;
&lt;br /&gt;
Also, look at the &lt;a href="http://www.microsoft.com/en-us/download/details.aspx?id=28785" rel="nofollow"&gt;Hands-On Labs for Enterprise Library 5.0 Integration Pack for Windows Azure&lt;/a&gt; which has some labs with the Transient Fault Handling Application Block.&lt;br /&gt;
&lt;br /&gt;
~~&lt;br /&gt;
Randy Levy&lt;br /&gt;
&lt;a href="m&amp;#x61;&amp;#x69;&amp;#x6c;&amp;#116;o&amp;#58;&amp;#101;&amp;#110;&amp;#116;&amp;#x6c;i&amp;#x62;&amp;#x2e;&amp;#x73;&amp;#117;&amp;#x70;&amp;#x70;o&amp;#114;&amp;#x74;&amp;#64;&amp;#x6c;&amp;#105;v&amp;#101;&amp;#x2e;&amp;#99;&amp;#x6f;&amp;#109;"&gt;&amp;#x65;n&amp;#x74;&amp;#108;&amp;#105;&amp;#x62;&amp;#46;&amp;#115;&amp;#x75;&amp;#112;&amp;#112;&amp;#x6f;&amp;#x72;&amp;#x74;&amp;#x40;&amp;#x6c;&amp;#x69;&amp;#118;&amp;#x65;&amp;#x2e;c&amp;#x6f;&amp;#x6d;&lt;/a&gt;&lt;br /&gt;
Enterprise Library support engineer&lt;br /&gt;
&lt;a href="entlib.codeplex.com/wikipage?title=Support%20How-to" rel="nofollow"&gt;Support How-to&lt;/a&gt; &lt;br /&gt;
&lt;/div&gt;</description><author>randylevy</author><pubDate>Fri, 17 May 2013 07:59:10 GMT</pubDate><guid isPermaLink="false">New Post: Retry logic for windows azure 20130517075910A</guid></item><item><title>New Post: Hierarchical category support in Logging Application Block?</title><link>http://entlib.codeplex.com/discussions/444010</link><description>&lt;div style="line-height: normal;"&gt;This feature was not implemented as part of Enterprise Library 6.  You can see the suggestions at &lt;a href="http://entlib.uservoice.com/forums/89245-enterprise-library-6-0-unity-3-0/suggestions/2970266-hierarchical-loggers-like-log4net" rel="nofollow"&gt;UserVoice&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
~~&lt;br /&gt;
Randy Levy&lt;br /&gt;
&lt;a href="m&amp;#x61;&amp;#x69;&amp;#x6c;&amp;#116;o&amp;#58;&amp;#101;&amp;#110;&amp;#116;&amp;#x6c;i&amp;#x62;&amp;#x2e;&amp;#x73;&amp;#117;&amp;#x70;&amp;#x70;o&amp;#114;&amp;#x74;&amp;#64;&amp;#x6c;&amp;#105;v&amp;#101;&amp;#x2e;&amp;#99;&amp;#x6f;&amp;#109;"&gt;&amp;#x65;n&amp;#x74;&amp;#108;&amp;#105;&amp;#x62;&amp;#46;&amp;#115;&amp;#x75;&amp;#112;&amp;#112;&amp;#x6f;&amp;#x72;&amp;#x74;&amp;#x40;&amp;#x6c;&amp;#x69;&amp;#118;&amp;#x65;&amp;#x2e;c&amp;#x6f;&amp;#x6d;&lt;/a&gt;&lt;br /&gt;
Enterprise Library support engineer&lt;br /&gt;
&lt;a href="entlib.codeplex.com/wikipage?title=Support%20How-to" rel="nofollow"&gt;Support How-to&lt;/a&gt; &lt;br /&gt;
&lt;/div&gt;</description><author>randylevy</author><pubDate>Fri, 17 May 2013 07:47:36 GMT</pubDate><guid isPermaLink="false">New Post: Hierarchical category support in Logging Application Block? 20130517074736A</guid></item><item><title>New Post: Hierarchical category support in Logging Application Block?</title><link>http://entlib.codeplex.com/discussions/444010</link><description>&lt;div style="line-height: normal;"&gt;Hello,&lt;br /&gt;
&lt;br /&gt;
It seems that logging application block does not support hierarchical category or category wildcard (e.g. category = &amp;quot;CompanyA.Common.*&amp;quot;). Many people regard this as a major short coming of entlib logging comparing to log4net &amp;amp; NLog.&lt;br /&gt;
&lt;br /&gt;
Is it still true for entlib 6?&lt;br /&gt;
&lt;br /&gt;
Thanks,&lt;br /&gt;
Karl&lt;br /&gt;
&lt;/div&gt;</description><author>karldodd</author><pubDate>Fri, 17 May 2013 07:31:39 GMT</pubDate><guid isPermaLink="false">New Post: Hierarchical category support in Logging Application Block? 20130517073139A</guid></item><item><title>New Post: Entlib6 DAAB - Using accessors to execute stored procedures with optional parameters?</title><link>http://entlib.codeplex.com/discussions/443904</link><description>&lt;div style="line-height: normal;"&gt;The issue is that the accessors use an object array which is positional but if you are dealing with optional stored procedure parameters you need to supply all values with optional parameters being set to null or use parameter names and not set the optional parameters.&lt;br /&gt;
&lt;br /&gt;
Here is one way to get what you want -- there may be others.  In this approach the stored procedure parameters are discovered, then a custom IParameterMapper is used to indicate what parameter values will be set (in the correct order) and then a Custom SprocAccessor is created to handle the command object used for discovery.&lt;br /&gt;
&lt;div style="color:Black;background-color:White;"&gt;&lt;pre&gt;
    DatabaseFactory.SetDatabaseProviderFactory(&lt;span style="color:Blue;"&gt;new&lt;/span&gt; DatabaseProviderFactory());

    &lt;span style="color:Blue;"&gt;var&lt;/span&gt; db = DatabaseFactory.CreateDatabase();

    &lt;span style="color:Blue;"&gt;using&lt;/span&gt; (DbCommand cmd = db.GetStoredProcCommand(&lt;span style="color:#A31515;"&gt;&amp;quot;REPAIRTICKET_Select&amp;quot;&lt;/span&gt;))
    {
        db.DiscoverParameters(cmd);
        NamedParameterMapper parameterMapper = &lt;span style="color:Blue;"&gt;new&lt;/span&gt; NamedParameterMapper(&lt;span style="color:#A31515;"&gt;&amp;quot;@RepairTicket&amp;quot;&lt;/span&gt;);
        &lt;span style="color:Blue;"&gt;var&lt;/span&gt; ticketData = &lt;span style="color:Blue;"&gt;new&lt;/span&gt; CustomSprocAccessor&amp;lt;REPAIRTICKET&amp;gt;(db, cmd, parameterMapper).Execute(repairTicket);
    }

    &lt;span style="color:Blue;"&gt;public&lt;/span&gt; &lt;span style="color:Blue;"&gt;class&lt;/span&gt; NamedParameterMapper : IParameterMapper
    {
        &lt;span style="color:Blue;"&gt;private&lt;/span&gt; &lt;span style="color:Blue;"&gt;string&lt;/span&gt;[] parametersToUse;

        &lt;span style="color:Blue;"&gt;public&lt;/span&gt; NamedParameterMapper(&lt;span style="color:Blue;"&gt;params&lt;/span&gt; &lt;span style="color:Blue;"&gt;string&lt;/span&gt;[] parametersToUse)
        {
            &lt;span style="color:Blue;"&gt;this&lt;/span&gt;.parametersToUse = parametersToUse;
        }

        &lt;span style="color:Blue;"&gt;public&lt;/span&gt; &lt;span style="color:Blue;"&gt;void&lt;/span&gt; AssignParameters(DbCommand command, &lt;span style="color:Blue;"&gt;object&lt;/span&gt;[] parameterValues)
        {
            &lt;span style="color:Blue;"&gt;int&lt;/span&gt; parameterValueIndex = 0;

            &lt;span style="color:Blue;"&gt;for&lt;/span&gt; (&lt;span style="color:Blue;"&gt;int&lt;/span&gt; i = 0; i &amp;lt; command.Parameters.Count; i++)
            {
                &lt;span style="color:Blue;"&gt;if&lt;/span&gt; (parametersToUse.Contains(command.Parameters[i].ParameterName, StringComparer.OrdinalIgnoreCase) &amp;amp;&amp;amp;
                    command.Parameters[i].Direction == System.Data.ParameterDirection.Input)
                {
                    command.Parameters[i].Value = parameterValues[parameterValueIndex++];
                }
            }
        }
    }

    &lt;span style="color:Blue;"&gt;public&lt;/span&gt; &lt;span style="color:Blue;"&gt;class&lt;/span&gt; CustomSprocAccessor&amp;lt;TResult&amp;gt; : SprocAccessor&amp;lt;TResult&amp;gt; &lt;span style="color:Blue;"&gt;where&lt;/span&gt; TResult : &lt;span style="color:Blue;"&gt;new&lt;/span&gt;()
    {
        &lt;span style="color:Blue;"&gt;private&lt;/span&gt; DbCommand command;
        IParameterMapper parameterMapper;

        &lt;span style="color:Blue;"&gt;public&lt;/span&gt; CustomSprocAccessor(Database db, DbCommand command, IParameterMapper parameterMapper) 
            : &lt;span style="color:Blue;"&gt;base&lt;/span&gt; (db, command.CommandText, parameterMapper, MapBuilder&amp;lt;TResult&amp;gt;.BuildAllProperties())
        {
            &lt;span style="color:Blue;"&gt;this&lt;/span&gt;.command = command;
            &lt;span style="color:Blue;"&gt;this&lt;/span&gt;.parameterMapper = parameterMapper;
        }

        &lt;span style="color:Blue;"&gt;public&lt;/span&gt; &lt;span style="color:Blue;"&gt;override&lt;/span&gt; IEnumerable&amp;lt;TResult&amp;gt; Execute(&lt;span style="color:Blue;"&gt;params&lt;/span&gt; &lt;span style="color:Blue;"&gt;object&lt;/span&gt;[] parameterValues)
        {
            parameterMapper.AssignParameters(command, parameterValues);
            &lt;span style="color:Blue;"&gt;return&lt;/span&gt; &lt;span style="color:Blue;"&gt;base&lt;/span&gt;.Execute(command);
        }
    }

&lt;/pre&gt;&lt;/div&gt;You could probably add a bit more abstraction through extension methods (similar to how the block does).&lt;br /&gt;
&lt;br /&gt;
~~&lt;br /&gt;
Randy Levy&lt;br /&gt;
&lt;a href="m&amp;#x61;&amp;#x69;&amp;#x6c;&amp;#116;o&amp;#58;&amp;#101;&amp;#110;&amp;#116;&amp;#x6c;i&amp;#x62;&amp;#x2e;&amp;#x73;&amp;#117;&amp;#x70;&amp;#x70;o&amp;#114;&amp;#x74;&amp;#64;&amp;#x6c;&amp;#105;v&amp;#101;&amp;#x2e;&amp;#99;&amp;#x6f;&amp;#109;"&gt;&amp;#x65;n&amp;#x74;&amp;#108;&amp;#105;&amp;#x62;&amp;#46;&amp;#115;&amp;#x75;&amp;#112;&amp;#112;&amp;#x6f;&amp;#x72;&amp;#x74;&amp;#x40;&amp;#x6c;&amp;#x69;&amp;#118;&amp;#x65;&amp;#x2e;c&amp;#x6f;&amp;#x6d;&lt;/a&gt;&lt;br /&gt;
Enterprise Library support engineer&lt;br /&gt;
&lt;a href="entlib.codeplex.com/wikipage?title=Support%20How-to" rel="nofollow"&gt;Support How-to&lt;/a&gt; &lt;br /&gt;
&lt;/div&gt;</description><author>randylevy</author><pubDate>Fri, 17 May 2013 07:05:03 GMT</pubDate><guid isPermaLink="false">New Post: Entlib6 DAAB - Using accessors to execute stored procedures with optional parameters? 20130517070503A</guid></item><item><title>New Post: Remote Service Trace Listener using SSL</title><link>http://entlib.codeplex.com/discussions/443785</link><description>&lt;div style="line-height: normal;"&gt;Thanks, thats is exactly what i was looking for &lt;br /&gt;
&lt;/div&gt;</description><author>lax4u</author><pubDate>Thu, 16 May 2013 20:39:17 GMT</pubDate><guid isPermaLink="false">New Post: Remote Service Trace Listener using SSL 20130516083917P</guid></item><item><title>New Post: Enterprise Library 6 - Documentation and Samples</title><link>http://entlib.codeplex.com/discussions/443908</link><description>&lt;div style="line-height: normal;"&gt;The documentation along with supporting samples are targeted to be released this month.&lt;br /&gt;
&lt;br /&gt;
See &lt;a href="http://blogs.msdn.com/b/agile/archive/2013/04/25/just-released-microsoft-enterprise-library-6.aspx" rel="nofollow"&gt;Just released - Microsoft Enterprise Library 6&lt;/a&gt; for a discussion of the release.&lt;br /&gt;
&lt;br /&gt;
~~&lt;br /&gt;
Randy Levy&lt;br /&gt;
&lt;a href="m&amp;#x61;&amp;#x69;&amp;#x6c;&amp;#116;o&amp;#58;&amp;#101;&amp;#110;&amp;#116;&amp;#x6c;i&amp;#x62;&amp;#x2e;&amp;#x73;&amp;#117;&amp;#x70;&amp;#x70;o&amp;#114;&amp;#x74;&amp;#64;&amp;#x6c;&amp;#105;v&amp;#101;&amp;#x2e;&amp;#99;&amp;#x6f;&amp;#109;"&gt;&amp;#x65;n&amp;#x74;&amp;#108;&amp;#105;&amp;#x62;&amp;#46;&amp;#115;&amp;#x75;&amp;#112;&amp;#112;&amp;#x6f;&amp;#x72;&amp;#x74;&amp;#x40;&amp;#x6c;&amp;#x69;&amp;#118;&amp;#x65;&amp;#x2e;c&amp;#x6f;&amp;#x6d;&lt;/a&gt;&lt;br /&gt;
Enterprise Library support engineer&lt;br /&gt;
&lt;a href="entlib.codeplex.com/wikipage?title=Support%20How-to" rel="nofollow"&gt;Support How-to&lt;/a&gt; &lt;br /&gt;
&lt;/div&gt;</description><author>randylevy</author><pubDate>Thu, 16 May 2013 14:53:19 GMT</pubDate><guid isPermaLink="false">New Post: Enterprise Library 6 - Documentation and Samples 20130516025319P</guid></item><item><title>New Post: Activation error occured while trying to get instance of type Database, key ""</title><link>http://entlib.codeplex.com/discussions/443898</link><description>&lt;div style="line-height: normal;"&gt;Everything looks fine.  Are you sure that the app.config is deployed along with the .exe (e.g. as myapp.exe.config)?  Otherwise, if you could supply a sample project it would help determine what the issue is.&lt;br /&gt;
&lt;br /&gt;
~~&lt;br /&gt;
Randy Levy&lt;br /&gt;
&lt;a href="m&amp;#x61;&amp;#x69;&amp;#x6c;&amp;#116;o&amp;#58;&amp;#101;&amp;#110;&amp;#116;&amp;#x6c;i&amp;#x62;&amp;#x2e;&amp;#x73;&amp;#117;&amp;#x70;&amp;#x70;o&amp;#114;&amp;#x74;&amp;#64;&amp;#x6c;&amp;#105;v&amp;#101;&amp;#x2e;&amp;#99;&amp;#x6f;&amp;#109;"&gt;&amp;#x65;n&amp;#x74;&amp;#108;&amp;#105;&amp;#x62;&amp;#46;&amp;#115;&amp;#x75;&amp;#112;&amp;#112;&amp;#x6f;&amp;#x72;&amp;#x74;&amp;#x40;&amp;#x6c;&amp;#x69;&amp;#118;&amp;#x65;&amp;#x2e;c&amp;#x6f;&amp;#x6d;&lt;/a&gt;&lt;br /&gt;
Enterprise Library support engineer&lt;br /&gt;
&lt;a href="entlib.codeplex.com/wikipage?title=Support%20How-to" rel="nofollow"&gt;Support How-to&lt;/a&gt; &lt;br /&gt;
&lt;/div&gt;</description><author>randylevy</author><pubDate>Thu, 16 May 2013 14:49:49 GMT</pubDate><guid isPermaLink="false">New Post: Activation error occured while trying to get instance of type Database, key "" 20130516024949P</guid></item><item><title>New Post: Enterprise Library 6 - Documentation and Samples</title><link>http://entlib.codeplex.com/discussions/443908</link><description>&lt;div style="line-height: normal;"&gt;When are the new code samples and updated documentation going to be available? The &amp;quot;Developer's Guide to Microsoft Enterprise Library-Preview.pdf&amp;quot; is obviously not complete. Neither is the .chm. &lt;br /&gt;
&lt;br /&gt;
I find it odd they could release the library without the updated documentation but I suppose that is a reflection of the current chaotic state of Microsoft.&lt;br /&gt;
&lt;br /&gt;
Its also confusing that the homepage here and the MSDN say the April 13th release is an &amp;quot;Official Release&amp;quot; but the downloads link here shows it as a beta. Is this a beta release or a production release? &lt;br /&gt;
&lt;/div&gt;</description><author>BBauer42</author><pubDate>Thu, 16 May 2013 13:00:17 GMT</pubDate><guid isPermaLink="false">New Post: Enterprise Library 6 - Documentation and Samples 20130516010017P</guid></item><item><title>New Post: Entlib6 DAAB - Using accessors to execute stored procedures with optional parameters?</title><link>http://entlib.codeplex.com/discussions/443904</link><description>&lt;div style="line-height: normal;"&gt;I'm working with Enterprise Library 6 and using the Data Access Application Block. I am having trouble using accessors to execute stored procedures with optional parameters. For example, lets say I have a simple stored procedure to select a repair ticket by the ticket number, the group number, or both the ticket and group number. &lt;br /&gt;
&lt;pre&gt;&lt;code&gt;CREATE PROCEDURE [Repair].[REPAIRTICKET_Select]
    @RepairTicket   nvarchar(6) = NULL,
    @GroupNumber    nvarchar(5) = NULL
AS
BEGIN
    
    SET NOCOUNT ON;

    SELECT * FROM [Repair].[REPAIRTICKET]
    WHERE (@RepairTicket IS NULL OR (RepairTicket = @RepairTicket))
      AND (@GroupNumber IS NULL OR (GroupNumber = @GroupNumber))
    OPTION (RECOMPILE)

END&lt;/code&gt;&lt;/pre&gt;

This doesn't seem to play well with the .ExecuteSprocAccessor&amp;lt;T&amp;gt;() unless I'm missing something. When I try to retrieve a ticket from the SQL Database (by ONLY the RepairTicket NOT the Group) with the following I get a number of parameters mismatch error.&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;var ticketData = sqlDB.ExecuteSprocAccessor&amp;lt;REPAIRTICKET&amp;gt;(&amp;quot;Repair.REPAIRTICKET_Select&amp;quot;, repairTicket).ToList();&lt;/code&gt;&lt;/pre&gt;

I have to actually pass the group in as null to get the accessor to work.&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;var ticketData = sqlDB.ExecuteSprocAccessor&amp;lt;REPAIRTICKET&amp;gt;(&amp;quot;Repair.REPAIRTICKET_Select&amp;quot;, repairTicket, null).ToList();&lt;/code&gt;&lt;/pre&gt;

This is fine for this stored procedure. However, I have other update sprocs that have 20+ optional parameters. I don't want to have to explicitly pass null to the .ExecuteSprocAccessor's object[] parameters. Not to mention how error prone this would be. I would have to be looking at the sproc and making sure of the parameter order every time. &lt;br /&gt;
&lt;br /&gt;
It would be much nicer if I could just pass the single parameter in my first example by name to the accessor and leave off any null parameters. Is this possible? Thanks in advance.&lt;br /&gt;
&lt;/div&gt;</description><author>BBauer42</author><pubDate>Thu, 16 May 2013 12:36:54 GMT</pubDate><guid isPermaLink="false">New Post: Entlib6 DAAB - Using accessors to execute stored procedures with optional parameters? 20130516123654P</guid></item></channel></rss>