title: How to add single quotes for string value of dynamic query string and use it in linq
body: <p>I am passing this following query string in where method using linq. I am using dynamic linq library.</p>
  
  <p>Querystring:</p>
  
  <pre><code>(cid=GB)AND(lvl=50 OR lvl=51 OR lvl=52 OR lvl=53 OR lvl=54 OR lvl=55 OR lvl=56 OR lvl=57 OR lvl=58 OR lvl=59 OR lvl=60)
  </code></pre>
  
  <p>Linq Query: </p>
  
  <pre><code>var query = context.Tablename.Where(resultQueryString, null);  
  </code></pre>
  
  <p>Before passing the query string I have to change the string cid to countrycode and lvl to level . so i used string builder for replacing the string.</p>
  
  <pre><code>           StringBuilder outputString = new StringBuilder(querystring);
             outputString.Replace("cid","CountryCode");
             outputString.Replace("lvl", "Level");
             outputString.Replace("AND", "&amp;&amp;");
             outputString.Replace("OR", "||");
  </code></pre>
  
  <p>here what is my question is i have to add the single quotes for countrycode value ie, i have to get output like (countrycode='GB')&amp;&amp;(level=50 || level=51 || level=52 ...)</p>
  
  <p>how i can add single quotes for countrycode value and pass that querystring into where method.</p>
  
  <p>please provide the solution or any other way we can achieve this one.</p>