tri_inn

tri_inn

  • NA
  • 1.2k
  • 232.9k

EF: Dynamically build search clause against DB

Jun 21 2017 10:35 AM

i use EF v5/6. i want to know how could i build where clause dynamically when user will try to add search filter dynamically through UI.

see the UI first enter image description here

now end user will add as many as filter through the above UI and try to search database.

i try to search google for some solution as a result i can add multiple search to my db table with EF and i found few. here is few links

https://stackoverflow.com/a/5595591/6188148

https://stackoverflow.com/a/24824290/6188148

the above guide line is tough for me to understand. so i am looking something easy.

this link bit close to my requirement https://stackoverflow.com/a/16646241/6188148 but still i am not getting idea how to customize their code to use for my scenario.

so my request anyone can help with a small sample code which help me to get the things done. thanks

Answers (1)