linq select rows based on list code example
Example 1: linq where id in list
var result = _dataContext.table.Where(x => idList.Contains(x.Id));
Example 2: filter by list of ids in linq
var userProfiles = _dataContext.UserProfile
.Where(t => idList.Contains(t.Id));