i want to receive Sections within MasterDataAttId_All bu this code returns all sections if any section id contains MasterDataAttId_All. How to receive Sections that it's id equals any MasterDataAttId_All's id
var result = MasterData.Where(md => md.sections.Any(x => MasterDataAttId_All.Contains(x.SectionId))).ToList()
Loading
Tuhin PaulPosted Jan 15, 2025, 6:21 PM
if
MasterDataAttId_Allis a collection of IDs and you want to check if any of theSectionIdmatches with the IDs in the collection, you should use theContainsmethod in a different way.Jignesh KumarPosted Nov 28, 2024, 6:15 AM
Hello Mertz,
Please use this query,