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

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

Code answers related to "how to query items with any id in a list of ids linq c#"

C# Answers by Framework

Browse Popular Code Answers by Language