Do ADO.Net DataTables have indexes?

前端 未结 11 2188
别那么骄傲
别那么骄傲 2021-01-01 15:11

I am using VSTS 2008 + C# + .Net 3.5 + SQL Server 2008 + ADO.Net. If I load a table from a database by using a DataTable of ADO.Net, and in the database table, I defined a c

11条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-01 15:37

    My reading of the docs is that the correct way to achieve this (if needed) is to use AsDataView to produce a DataView (or LinqDataView) that's bound to the underlying table. If your DataTable is invariant then the DataView can be static to avoid redundant re-indexing.

    I am currently investigating Linq to DataSet, and this q was helpful to me, so thanks.

提交回复
热议问题