1
List<BusinessObjects.BusinessEntity> relatedBEs = 
    (from be in context.BusinessEntities
.Where(w=> RelatedBusinessEntityGuids.Contains(w.BusinessEntityGuid))
.Select(s=>s.Name)).ToList;
4

1 回答 1

0

尝试这个:

List<BusinessObjects.BusinessEntity> relatedBEs = context.BusinessEntities.Where(w=> RelatedBusinessEntityGuids.Contains(w.BusinessEntityGuid)).ToList();

更新:

List<string> names= context.BusinessEntities.Where(w=> RelatedBusinessEntityGuids.Contains(w.BusinessEntityGuid)).Select(s=>s.Name).ToList();
于 2013-07-30T09:12:52.563 回答