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

Code Example - how to query items with any id in a list of ids linq csharp

                
                        var userProfiles = _dataContext.UserProfile
                               .Where(t => idList.Contains(t.Id));
                    
                
 

linq where id in list

                        
                                var result = _dataContext.table.Where(x => idList.Contains(x.Id));
                            
                        
 

Related code examples