集合值参数与实体框架? [英] Collection-valued parameters with The Entity Framework?

查看:89
本文介绍了集合值参数与实体框架?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的最后一个项目,我决定使用实体框架,它是一切顺利,直到我试图让与的其中的,我得到了一个错误。

In my last project i decided to use Entity Framework and it was all going well until i try to get datas with "where in", i got an error.

在一个很小的搜索我已经拿出的这个帖子和的该职位

After a tiny search i ve come up with this post and that post.

这就是我要做的。

var all = fooelements
              .Where(l=>controlsToGet
                            .Contains(l.Control.Name));



是否有任何与lambda表达式或LINQ实体框架处理呢?

Is there any to handle it with lambda expressions or linq with the Entity Framework ?

感谢您

推荐答案

在前面的答案建设我有一个提示,可以很容易要做到这一点的位置:

Building upon the previous answer I have a tip that makes it easy to do this here:

提示8 - 如何写凡在使用LINQ到实体样式的查询

希望这有助于

亚历克斯·詹姆斯

项目经理 - 实体框架团队

Program Manager - Entity Framework Team

Entity Framework的提示

这篇关于集合值参数与实体框架?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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