title: Storing search parameters
body: <p>I'm currently building a website in .NET MVC 4, using Entity Framework to access SQL Server.</p>
  
  <p>The website should have a complex search with multiple choices for the user, create a new search (free search), choose from the last 5 searches (history search), choose from stored search parameters.</p>
  
  <p>What I'm having trouble with is the concept of saving the search parameters/sql string, because it's not sessional/cache based and should be stored somewhere (SQL Server / MongoDB / XML) I'm having the hard time in taking the most optimized path, if it's the SQL way then maybe create an entity that stores the search parameters as entities and afterward converting it into a SQL string for the search, or store it in XML and than serialize it with JSON.</p>
  
  <p>Some fields of the search are not an exact db/entity match and requires summing/converting (like hours that would be calculated into certain time).</p>
  
  <p>I'm more inclined to take out the best of Entity Framework abilities for the cause.</p>
  
  <p>Would like to hear some expert thoughts if possible, Thank you.</p>