Where is .CopyToDataTable();

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
Zero-G.
Posts: 398
Joined: Sat 09 Dec 2006 12:20

Where is .CopyToDataTable();

Post by Zero-G. » Fri 14 Nov 2008 12:24

Hey

I use dotConnect for MySQL v5 BETA

Where is .CopyToDataTable();?

Code: Select all


var query1 = from i in items
                         where i.Price > 9.99
                         orderby i.Price
                         select i;

            // load into new DataTable
            DataTable table1 = query1.CopyToDataTable();
THX

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Mon 17 Nov 2008 07:54

We are supporting only those functionality that is implemented by Microsoft.

The existing CopyToDataTable methods only operate on an IEnumerable)>) source where the generic parameter T is of type DataRow. Although this is useful, it does not allow tables to be created from a sequence of scalar types, from queries that return anonymous types, or from queries that perform table joins.

For more information, visit http://msdn.microsoft.com/en-us/library/bb386921.aspx

Post Reply