title: Getting error The 'proprrty1' property on 'table1' could not be set to a 'System.Int64' value. in my mvc application
body: <p>I am getting an error in my mvc application. I am trying to display record  from my sql table using entity framework. here is the code which i am trying. But I dnt know why this code giving me error </p>
  
  <p>This is my model </p>
  
  <pre><code> [Table("tbInsertMobile")]
      public class tbInsertMobile
      {
          [Key]
          public int MobileID { get; set; }
          public string MobileName { get; set; }
          public string MobileIMEno { get; set; }
          public string mobileprice { get; set; }
          public string mobileManufacured { get; set; }
  
      }
  </code></pre>
  
  <p>my another class in model </p>
  
  <pre><code>public class EmployeeContext:DbContext
      {
          public DbSet&lt;tbInsertMobile&gt; usermobiles { get; set; }
      }
  </code></pre>
  
  <p>This the code of my contoller</p>
  
  <pre><code> public ActionResult Index(int id)
          {
              EmployeeContext employeeContext = new EmployeeContext();
              tbInsertMobile employee = employeeContext.usermobiles.Single(x =&gt; x.MobileID == id);
  
              return View(employee);
          }
  </code></pre>
  
  <p>and now the error which i am getting is this </p>
  
  <pre><code>The 'MobileID' property on 'tbInsertMobile' could not be set to a 'System.Int64' value. You must set this property to a non-null value of type 'System.Int32
  </code></pre>
  
  <p>Experts Tell me where I am getting this error
  Thanks</p>