Answers for "linq where id in list"

C#
1

linq where id in list

var result = _dataContext.table.Where(x => idList.Contains(x.Id));
Posted by: Guest on August-12-2020
0

how to query items with any id in a list of ids linq c#

var userProfiles = _dataContext.UserProfile
                               .Where(t => idList.Contains(t.Id));
Posted by: Guest on September-02-2020

C# Answers by Framework

Browse Popular Code Answers by Language