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>();

原文地址:https://www.cnblogs.com/akatuki/p/4554278.html