How to query a nested list using a lambda expression

前端 未结 2 796
庸人自扰
庸人自扰 2021-02-04 01:53

In my repository implementation I can run the following query using a lambda expression:

public IList GetUsersFromCountry(string)
{
    return _UserR         


        
2条回答
  •  伪装坚强ぢ
    2021-02-04 02:31

    This might work (untested)...

    var clubs = ClubRepository.Where(c=>c.MemberShips.Any(m=>m.User.Age > 45));
    

提交回复
热议问题