LINQ 到对象到数据集

发布于 2024-08-31 14:58:18 字数 42 浏览 1 评论 0原文

我可以执行从列表到数据集的 LINQ 连接吗?这样做有什么注意事项吗?

Can I do a LINQ Join from an List to a DataSet? Are there any caveats to doing this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

握住你手 2024-09-07 14:58:18

前面存在明显的性能问题,具体取决于连接每侧的大小,因此真正需要注意的是规模。

您不必进行任何转换,您可以像通常使用 LINQ 一样从数据集/表中选择行,只需包含一个“on”子句来告诉它如何将行与您的 List进行比较;

There are obvious performance problems ahead, depending on the size of each side of the join, so the real caveat is scale.

You won't have to do any converting, you can select rows out of the dataset/table as you would normally with LINQ and just include an "on" clause to tell it how to compare a row to your List<T>.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文