Linq 实现普通sql中 where in 的功能

user.ProjectIds 的值是使用逗号分隔的 例如:1,2,3

projectList = (from a in projectList where (user.ProjectIds.Split(',')).Contains(a.ProjectId) select a).ToList<Project>();

posted on 2015-06-05 11:58  hellofking  阅读(920)  评论(0编辑  收藏  举报

导航