title: Create a Simple Class and Call Its Method from a cshtml File without using App_Code
body: <p>I have seen this related question <a href="https://stackoverflow.com/questions/3358633/creating-and-simple-class-and-calling-a-method-from-a-cshtml-file">Creating and Simple Class and Calling a Method from a cshtml File</a>. How can we do that <strong>without using the App_Code folder?</strong></p>
  
  <p>In my project's root, I have a Something.cs class:</p>
  
  <pre><code>public class Something 
  {
      public static void DoIt()  
      { 
  
      }
  }
  </code></pre>
  
  <p>In my project's root, I also have index.cshtml with the following code:</p>
  
  <pre><code>@Something.DoIt()
  </code></pre>
  
  <p>The name <code>Something</code> does not exist in the current context of index.cshtml.</p>