A: 

Using "Entity Framework 1.0" (the version that was, until today, the most current) you have the right idea- get the Status from the database to set on the Task. Are you sure you're actually getting a Status entity with the syntax you're using above?

Step through your code to make sure the reference on the Task entity is being set to an actual materialized Status entity.

Dave Swersky
Hey Dave. Debugging through the code, I am getting a valid status entity assigned to t.Status.....Oh dear, just found my problem. Foreign Key is linking to the wrong field. Will update my question. Thanks for your answer, it made me look more thoroughly.
Dan Black
A: 

you can try

        Task t = new Task();
        t.Id = 1234;
        t.Title = "foo";
        t.Status.EntityKey = new EntityKey("tblStatus","StatusId",t.StatusID);

hope this will work

anishmarokey
A: 

in .net framework 4.0 u can use this simple way:

 Task t = new Task();
    t.Id = 1234;
    t.Title = "foo";
    t.StatusId = 5678;

reference: http://blogs.msdn.com/b/adonet/archive/2009/11/06/foreign-key-relationships-in-the-entity-framework.aspx

BenyBlack