Код: Выделить всё
public class GetCategoriesReply : BaseReply
{
public IEnumerable Categories { get; set; }
}
public class Subsystem
{
public IEnumerable cat1 { get; set; }
public string id { get; set; }
public string name { get; set; }
}
public class cat1
{
public IEnumerable cat2 { get; set; }
public string id { get; set; }
public string name { get; set; }
}
public class cat2
{
public IEnumerable cat3 { get; set; }
public string id { get; set; }
public string name { get; set; }
}
public class cat3
{
public string id { get; set; }
public string name { get; set; }
}
Я пробовал это, но не получилось:
Код: Выделить всё
var cat3list = categoryList.Categories
.Where(s => s.name == "Payment")
.Select(x => x.cat1.Where(c => c.name == "Admin").SelectMany(y => y.cat2.Select(z => z.cat3))
.ToList());
С уважением
/Руди
Подробнее здесь: https://stackoverflow.com/questions/526 ... ts-c-sharp