如何在linq中逐步将数据复制到数据表。 [英] how to copy data to data table in linq step by step proce.

查看:46
本文介绍了如何在linq中逐步将数据复制到数据表。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我在linq中比较新鲜,所以请给我链接或写一步一步的程序来填充linq中的数据表。



这里是代码



var Sql =来自t1 in pitbull.ACC_APP1_QuickViews.AsEnumerable()

在pitbull加入t2。 t1.VehicleId上的OCC_VehicleGroups.AsEnumerable()等于t2.VehicleID

选择t1;

DataTable dt = new DataTable();

dt = Sql.copytodatatable();



复制到datatable不支持。

Hi,
I am fresher in linq,So please give me the link or write step by step procedure to fill data table in linq.

here is the code

var Sql = from t1 in pitbull.ACC_APP1_QuickViews.AsEnumerable()
join t2 in pitbull.OCC_VehicleGroups.AsEnumerable() on t1.VehicleId equals t2.VehicleID
select t1;
DataTable dt = new DataTable();
dt=Sql.copytodatatable();

copy to datatable not support.

推荐答案

Dim query = _
    From order In orders.AsEnumerable() _
    Where order.Field(Of DateTime)("OrderDate") > New DateTime(2001, 8, 1) _
    Select order

Dim boundTable As DataTable = query.CopyToDataTable()


这篇关于如何在linq中逐步将数据复制到数据表。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆