0

I am creating a help desk application and want to query all rows and columns of each table in my database to find the result. I'm not sure if this is the correct way to do this. I am building the application using sql-server, entity framework and asp.net mvc. So far I have the string in my action result I'm just not sure how to search all tables.

I am thinking of creating a view with all the fields I require?

Any suggestions? Thanks Adam.

Adam Lee
  • 66
  • 1
  • 15
  • No matter how you slice this the performance is going to be hideous. You are asking about searching every column of every row of every table. There is no fast way to do this. I suspect that isn't really what you want. You should look into some search tools like Lucene. It can help this kind of thing immensely. – Sean Lange Jun 27 '17 at 13:27
  • 1
    I suppose you could do some sort of reflection on the EF side, but I would just write a store procedure and call it from EF based on [this](https://stackoverflow.com/questions/1796506/search-all-tables-all-columns-for-a-specific-value-sql-server) – Steve Greene Jun 27 '17 at 13:28
  • In sql server management studio I was gonna create a view with all the columns I need would you guys recommend this? I would create a stored procedure but that defeats the purpose of EF. – Adam Lee Jun 27 '17 at 13:32

0 Answers0