How To Use Filter Pattern With Generic Lambda Expression
Too Long; Didn't Read
The filter and pipeline patterns can be optimized with code reduction using lambda expression(shortcuts for anonymous method) as concrete filter condition. To demonstrate concept, the sample WPF UI application was created. The next section will describes view model usage filter pattern. In MVVM the one of responsibilities of the view model is to handle user interaction and data changes. In our case the filter condition value changes should be passed to business layer to apply filters on given data collection. In this sample application, the only one EmployeeTypeselected property filter is demonstrated.