问题描述
是数据访问应用程序块中可用的LINQ支持.
推荐答案
我想答案已过时,5.0版本具有对LINQ的支持. 支持以下方案:
- 使用DataReader检索多行数据
- 使用数据集检索多行数据
- 执行命令并检索输出参数
- 执行命令并检索单值项目
- 在交易中执行多个操作
- 使用数据集对象中包含的数据更新数据库
- 从SQL Server数据库中检索XML数据
- 查询使用客户端技术(例如Linq
)返回的数据- 使用回调处理程序或lambda表达式执行异步数据访问
在这里查看: http:http://sdn .microsoft.com/en-us/library/ff664416%28V = pandp.50%29.aspx
其他推荐答案
如果您要问的话,它不包括Linq提供商.
- 使用dbdatareader检索多行.这种情况说明了如何使用executereader方法从数据库中检索多行数据以显示在表格中显示 - 无明确缓存数据,使用数据集对象对其进行操作或将其传递到应用程序中的其他组件.换句话说,它说明了如何尽快显示结果.
- 使用数据集检索多行.这种情况说明了如何使用执行的方法来传递组件和多层应用程序层之间的数据.数据由一个或多个数据表组成,并且可以选择地将表连接在一起的关系.
- 执行命令并访问输出参数.此方案说明了如何使用executeNocer方法检索包含多个列值的单行.
- 执行命令并访问单项结果.这种情况说明了如何使用ExecutesCalar方法执行单项查找.
- 在交易中执行多个更新.这种情况说明了如何使用交易中的执行量指定方法对数据库执行多个操作,在这种情况下,所有操作都必须成功或无成功.
- 使用数据集更新数据库.这种情况说明了如何在更改数据集对象之后,您可以使用更新方法来更新数据库并使您的更改永久性.
- 将多行作为XML检索.这种情况说明了如何使用executexmlreader方法从SQL Server检索数据并以XML格式返回数据.
问题描述
Is LINQ support available in the Data Access Application Block.
推荐答案
I guess the answer is outdated, 5.0 version has support for linq. The following scenarios are supported:
- Using a DataReader to retrieve multiple rows of data
- Using a DataSet to retrieve multiple rows of data
- Executing a command and retrieving the output parameters
- Executing a command and retrieving a single-value item
- Performing multiple operations within a transaction
- Updating a database with data contained in a DataSet object
- Retrieving XML data from a SQL Server database
- Querying the data returned using client-side techniques such as LINQ
- Performing asynchronous data access with a callback handler or Lambda expression
Look here: http://msdn.microsoft.com/en-us/library/ff664416%28v=pandp.50%29.aspx
其他推荐答案
It doesn't include a LINQ provider, if that's what you're asking.
Suggest looking at the list of Key Scenarios that are expedited by using the block:
- Using a DbDataReader to Retrieve Multiple Rows. This scenario illustrates how you can use the ExecuteReader method to retrieve multiple rows of data from a database for display in tabulated form—without explicitly caching the data, using a DataSet object to manipulate it, or passing it to other components within your application. In other words, it illustrates how to display the results as quickly as possible.
- Using a DataSet to Retrieve Multiple Rows. This scenario illustrates how you can use the ExecuteDataSet method to pass data between the components and the tiers of a multi-tier application. The data consists of one or more data tables and, optionally, the relationships that link the tables together.
- Executing a Command and Accessing Output Parameters. This scenario illustrates how you can use the ExecuteNonQuery method to retrieve a single row that contains multiple column values.
- Executing a Command and Accessing a Single-Item Result. This scenario illustrates how you can use the ExecuteScalar method to perform a single-item lookup.
- Performing Multiple Updates Within a Transaction. This scenario illustrates how you can use the ExecuteNonQuery method from within a transaction to perform multiple operations against a database, where it is essential that either all operations succeed or none succeed.
- Using a DataSet to Update a Database. This scenario illustrates how, after changing a DataSet object, you can use the UpdateDataSet method to update the database and make your changes permanent.
- Retrieving Multiple Rows As XML. This scenario illustrates how you can use the ExecuteXmlReader method to retrieve data from a SQL Server and have that data returned in XML format.