Hi There,
Just trying to figure out how do achieve the following:
I have an edit form, and a simple viewmodel for said form. The viewmodel contains an entity and then a few SelectLists for dropdowns.
The problem is this: The entity in question has a related entity (which is called room). I want the user to be able to select a different room from a dropdown and have this related entity changed accordingly.
I cant just set the RoomID to a new value and the entity framework doesn't expose it. If I try then UpdateModel fails.
So, is is possible to update an entity reference via an edit form?
Thanks in Advance
(starting to wish I'd used Linq to SQL)
(Edited for clarity)