Jaima Joseph

Jaima Joseph

  • NA
  • 94
  • 105.9k

how to serch databse using multiple column values in MVC C#

Mar 4 2015 7:10 AM

Hi,

 I have to implement one logic  where  I have a no. of fields and based on the values I am entering in these fields I have to show the search result in my view.ie, whatever values I am entering in these fields I need to search the db and retrieve records. I t is not mandatory to enter value for all the fields. At a time I may need to search entering value in 1 field  or two or many or all. Any time I have to show result based on the entered values. Should I use a procedure or using Linq directly is efficient? how to write the query efficiently?

 
Any help will be appreciated.
 
Thanks in advance. 

Answers (4)