LINQ 到对象到数据集
我可以执行从列表到数据集的 LINQ 连接吗?这样做有什么注意事项吗?
Can I do a LINQ Join from an List to a DataSet? Are there any caveats to doing this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
我可以执行从列表到数据集的 LINQ 连接吗?这样做有什么注意事项吗?
Can I do a LINQ Join from an List to a DataSet? Are there any caveats to doing this?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(1)
前面存在明显的性能问题,具体取决于连接每侧的大小,因此真正需要注意的是规模。
您不必进行任何转换,您可以像通常使用 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>
.