c# filter list where id in list of ids code example
Example 1: linq where id in list
var result = _dataContext.table.Where(x => idList.Contains(x.Id));
Example 2: how to query items with any id in a list of ids linq c#
var userProfiles = _dataContext.UserProfile
.Where(t => idList.Contains(t.Id));