Hi Chand,
David is correct. If StateCode (ie, "CA") is not your State's primary key - then you will need to either fetch the State entity from the DB to get the StateID, or you will need to know the StateID when updating your address entity (ie, myAddress.StateID = myStateID).
If you will only need USA states, then you can use the StateCode as the primary key and get rid of StateID. However, if you plan to support States/Provinces & other countries, then you will likely need to keep your current setup and fetch the State entity to obtain the StateID.
You can simply create a helper method to fetch your State entity. For instance:
myState.FetchByStateCode("USA", "CA")
mAddress.State = myState
Hope this helps!
Ryan
Also... Technically, this is not a 1:1 relationship, but a 1:8. 1:1 relationships share primary keys.