title: The parameters dictionary contains a null entry for parameter 'idd' of non-nullable type 'System.Int32'
body: <p>I am new here to learn MVC. I struck on this error, I couldn't find the solution.</p>
  
  <p>My Controller Look like this:</p>
  
  <pre><code>public class EmployeeDataController : Controller
  {
      public ActionResult Details(int idd)
      {
          EmployeeDataContext edc = new EmployeeDataContext();
          EmployeeData employee=  edc.employeedata.Single(emp =&gt; emp.id == idd);
  
          return View(employee);
      }
  }
  </code></pre>
  
  <p>When executing the Details method from the browser (i.e. <a href="http://localhost:4166/EmployeeData/details/1" rel="nofollow">http://localhost:4166/EmployeeData/details/1</a>) I get this error:</p>
  
  <blockquote>
    <p>The parameters dictionary contains a null entry for parameter 'idd' of non-nullable type 'System.Int32' for method 'System.Web.Mvc.ActionResult Details(Int32)' in 'MvcDemo1.Controllers.EmployeeDataController'. An optional parameter must be a reference type, a nullable type, or be declared as an optional parameter. Parameter name: parameters</p>
  </blockquote>
  
  <p>Any help would be great to solve my problem.</p>
  
  <hr>
  
  <p>When i update my code and try to compile the program, there is no error at compile time but when i run the program that time i got an error</p>
  
  <pre><code>EmployeeData employee=  edc.employeedata.Single(x=&gt;x.id==id);
  </code></pre>
  
  <p>**An exception of type 'System.Data.Entity.Core.EntityCommandExecutionException' occurred in EntityFramework.SqlServer.dll but was not handled in user code</p>
  
  <p>Additional information: An error occurred while executing the command Definition **</p>