I have a list containing Id's of my UserProfile
table. How can i select all UserProfiles
based on the list of Id's i got in a var
using LINQ
?
var idList = new int[1, 2, 3, 4, 5];
var userProfiles = _dataContext.UserProfile.Where(......);
I got stuck right here. I can do this using for loops etc. But I'd rather do this with LINQ
.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…