How do I extract data from a DataTable?

前端 未结 7 1591
失恋的感觉
失恋的感觉 2020-12-02 07:08

I have a DataTable that is filled in from an SQL query to a local database, but I don\'t know how to extract data from it. Main method (in test program):

<
7条回答
  •  不思量自难忘°
    2020-12-02 07:51

    Unless you have a specific reason to do raw ado.net I would have a look at using an ORM (object relational mapper) like nHibernate or LINQ to SQL. That way you can query the database and retrieve objects to work with which are strongly typed and easier to work with IMHO.

提交回复
热议问题