.net - type error in EF 4.1 -


I have created a unit and it has a type int int when I run the project and use this unit I get the following error:

The 'id' property on 'product' can not be set to 'int64' value. You need to set this property in non-null value of type 'Int32'.

How can I fix this?

Edit:

I am using SQL Server and Entity Framework 4.1. I get an error in the administrator's action:

  public functioning test (long id) {return view (repository. Getobliger (id)); }    

You have mentioned that you enter int but If you are going through the long id, try converting it to int or change the id long in the unit.

Comments