Page 1 of 1

Where is .CopyToDataTable();

Posted: Fri 14 Nov 2008 12:24
by Zero-G.
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

Posted: Mon 17 Nov 2008 07:54
by Shalex
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