Mitch Wheat gave you the answer. You're trying to use the ID column, but the table has a PARENTID column.
Nigel
2009-06-13 13:50:31
Mitch Wheat gave you the answer. You're trying to use the ID column, but the table has a PARENTID column.
It looks as if your EF data model and your database are not in sync anymore. It seems as if your "Categories" object in the EF data model has an "ID" field but the table does not.
I would update the EF data model from the database and see if that fixes the problem. To do this, open up the EDMX designer and right click on an empty spot in the design surface, and pick the "Update model from database" option. That should bring the two worlds back into sync.
Marc