Why is so damn dificult update a navigation property in a EF model ??? RRS feed

  • Question

  • I have a simple EF model two tables both tables are connected with one FK (* - 1), in the first table I have information about clients the second one have clients category data, first table has a foreign key that let me know about the category of a client, adding a new client with its category is not a problem but when I try to update the client I dont know why all date fields that are not navigation properties are succesfully updated but this category navigation property is not updated, Im working with desconnected entities to update the client Im just creating the client object with all the new values after that im attaching my updated entity to my datacontext and executing the SaveChanges() Method in my datacontext but all the properties except the navigation property is updated, do you guys know about a different approach to deal with this, thanks in advance by your help.
    Wednesday, October 5, 2011 3:24 AM