Can I generate a linq expression dynamically in C#?

后端 未结 4 982
遥遥无期
遥遥无期 2021-01-22 08:40

I\'ve currently got a piece of Linq that looks something like this ;

List childrenToBeRemoved = this.ItemsSource.Where(o => o.ParentID == \"123         


        
4条回答
  •  时光说笑
    2021-01-22 09:24

    Put you linq expression into a function, and pass in this property as a parameter.

提交回复
热议问题