There is a List<Helper> list = new List<Helper>();

I want to use linq to pull the data for ODA. date There is an option to make through nested loops, but I would like to see a more elegant solution through linq.

 class Helper { public string Articule { get; set; } public List<Date> Dates { get; set; } } class Date { public string Data { get; set; } public string Cnt { get; set; } } 
  • four
    What do you want to get at the exit? - Zufir
  • I want to get a list with those elements that fall under the condition - Radzhab
  • one
    What exactly? Helper or Articule collection? Or what? - Artyom Okonechnikov
  • 2
    In Dates should be all the dates of the original element or just the desired one? - Zufir
  • one
    And why all these clarifications on the part of the data on the output could not be immediately placed in the original question? You have received at least three replies that were subsequently deleted after the clarifications made. Do not you think that you made people waste their precious time? - Alexander Muksimov

1 answer 1

 list.Where(l => l.Dates.Any(d => d.Data == "20170301")).ToList();