Microsoft.Practices.EnterpriseLibrary for .Net2.0使用中的问题(相关问题持续更新)

Microsoft.Practices.EnterpriseLibrary 2.0版本相对1.1版本有了很大的变化,很早前就下了1.1版,一直没在项目中用,看看gotDotNet,2.0版的CTP已经出了,下了个,用一下。。。。


Data Access Application Block

Improvements in the System.Data namespace have enabled us to simplify the architecture of the Data Access Application Block. The main changes are as follows:

         Internally, the application block now uses the new DbProviderFactory classes to create new database objects such as connections, commands and parameters.

         The DbCommandWrapper and derived classes have been removed from the design. This is because the new classes in the System.Data.Common namespace have largely replaced the functionality of the DbCommandWrapper class. Certain methods that were on the DbCommandWrapper class have been moved to the Database class.

         The block now uses System.Configuration to manage the database configuration information although the configuration data is structured in much the same way as it was in previous versions of Enterprise Library. It is likely that the final release will use the new built-in <configurationStrings> configuration section to store connection strings, rather than using its own configuration section. The block will still include its own configuration sections for advanced connection information such as Oracle package mapping.

         It is now much easier to use the Data Access Application Block without any configuration. Connection strings can be passed directly to the constructors of the various database types, such as SqlDatabase.

         Enterprise Library for .NET Framework 2.0 will not initially include support for IBM DB2 databases. This is because the new Data Access Application Block requires the use of ADO.NET 2.0-compliant managed providers, and none that support IBM DB2 databases are likely to be available in time for the final Enterprise Library release. The IBM DB2 databases may be supported in the future when ADO.NET 2.0 managed providers are available.

  <section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data" />
   connectionString="server=(local);database=EntLibQuickStarts;Integrated Security=true" />
 <dataConfiguration defaultDatabase="DataAccessQuickStart1"/>

<configuration xmlns="">
    <section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data" />
  <remove name="LocalSqlServer"/>
  <add name="LocalSqlServer" connectionString="Data Source=.;Integrated Security=True;Initial Catalog=Morning2" providerName="System.Data.SqlClient"/>

  <dataConfiguration defaultDatabase="LocalSqlServer"/>  <!--这一句给EnterpriseLibrary.Data的连接字符串用-->



  • 广告
  • 抄袭
  • 版权
  • 政治
  • 色情
  • 无意义
  • 其他