title: Asp.Net MVC3 - Linq not working in Razor Views
body: <p>I am not sure what went wrong but i could not able top use linq in razor view, but i can use linq in controllers.</p>
  
  <p>for example, i cannot run this code </p>
  
  <pre><code>@foreach (char ch in "abcdefghijklmnopqrstuvwxyz".ToCharArray().Where(ch=&gt;ch!='a'))
  {
  
  }
  </code></pre>
  
  <p>or</p>
  
  <pre><code>@Html.EditorFor(e=&gt;e.Id )
  </code></pre>
  
  <p>any solution for this?</p>
  
  <p><strong>Update</strong>: The problem was that, IDE shows red underline where linq is used. but runs without any problem. </p>