title: An error occur during executing my program that EntityCommandExecutionException was unhandled see innerException for Details
body: <p>I am trying to connect my MVC application with SQL server. but when i execute the program that time i am getting an error</p>
  
  <p>The description of error is</p>
  
  <blockquote>
    <p><em>An exception of type 'System.Data.Entity.Core.EntityCommandExecutionException' occurred in
    EntityFramework.SqlServer.dll but was not handled in user code
    Additional information: An error occurred while executing the command
    definition</em></p>
  </blockquote>
  
  <p>Here is a code</p>
  
  <pre><code>public class EmployeeDataController : Controller
      {
          public ActionResult Details( int d)
          {
              EmployeeDataContext edc = new EmployeeDataContext();
             EmployeeData employee=  edc.employeedata.Single(x =&gt; x.id==d);
  
  
      return View(employee);
  </code></pre>
  
  <p>The error occur at</p>
  
  <pre><code>EmployeeData employee=  edc.employeedata.Single(x =&gt; x.id==d);
  </code></pre>
  
  <p>I would really appreciate some guidance in this regard.</p>