How To Use Filter Pattern With Generic Lambda Expression

Written by mirambek-nagashbekov | Published 2020/09/10
Tech Story Tags: design-patterns | csharp | coding | programming | wpf | code-quality | filter-pattern | linq

TLDR 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.via the TL;DR App

no story

Published by HackerNoon on 2020/09/10