使用Microsoft Application Block for .NET时,是不是只要把SQLHelper.cs源程序包进来就行了吗?

解决方案 »

  1.   

    一般的做法是做项目引用,这样你的项目与Microsoft Application Block项目相对独立
      

  2.   

    思归的意思是,你可以把SqlHelper.cs文件编译成dll,然后在引用。我都是这样做的
      

  3.   

    When you create a data access client that uses the Data Access Application Block, you should perform the following steps:1.  Set a reference to the Data Access Application Block assembly Microsoft.ApplicationBlocks.Data.dll.2.  Add a using statement at the top of your data access client source file(s) to reference the Microsoft.ApplicationBlocks.Data namespace. All Data Access Application Block types are located within this namespace.3.  Add a using statement to reference the System.Data and System.Data.SqlClient namespaces. The SqlHelper methods use various types from these namespaces as input and return parameters.4.  Optionally, add a using statement to reference the System.Xml namespace. This is required only if you use the SqlHelper ExecuteXmlReader methods.