title: The named 'CommandType' does not exist in the current context
body: <p>Can someone help me understand why I'm getting that error here?</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Web;
  using System.Web.Mvc;
  using System.Threading.Tasks;
  using System.Data.SqlClient;
  using System.Configuration;
  
  namespace JsPractice.Controllers
  {
      public class SolutionController : Controller
      {
  
          public ActionResult Index ( )
          {
  
              return View();
          }
  
          [HttpPost]
          public ActionResult CreateNew ( int problem_id, string solver, string solution_code, string test_code )
          {
              // Going to move this to controller later .. 
              using ( SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["LocalJsPracticeDb"].ConnectionString) )
              {
                  using ( SqlCommand cmd = new SqlCommand("AddSolution", con) )
                  {
                      cmd.CommandType = CommandType.StoredProcedure;
                      cmd.Parameters.AddWithValue("@problem_id", problem_id);
                      cmd.Parameters.AddWithValue("@solver", solver);
                      cmd.Parameters.AddWithValue("@solution_code", solution_code);
                      cmd.Parameters.AddWithValue("@test_code", test_code);
                      con.Open();
                      cmd.ExecuteNonQuery();
                  }
  
              }
              return View();
          }
  
      }
  }
  </code></pre>
  
  <p>According to the documentation <a href="https://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlcommand.commandtype(v=vs.110).aspx" rel="noreferrer">https://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlcommand.commandtype(v=vs.110).aspx</a> I don't see what I'm doing wrong, as I've included <code>System.Data.SqlClient</code>.</p>