+3  A: 

Yes, the entity framework hides foreign key ID properties and shows navigation properties instead. There is a lengthy discussion about why it does that, here. The usual means of assigning a reference to another entity is to assign the entity instance, rather than the foreign key ID value, like this:

var foo = new Entity();
var status = (from .... select ...).FirstOrDefault();
foo.StatusCodes = status;

However, it is possible to assign a foreign key ID directly, if you happen to know what it is:

foo.StatusCodesReference = new EntityKey(
   "MyEntityContextName.StatusCodesEntitySetName", "StatusCodeId", value);

Obviously, substitute the real values in the above.

Craig Stuntz
OK I get it, I tried it in my code and it works. I need a serious reorientation from Linq to SQL -> Linq to Entities. Thanks for your help (again) :-)