Hi All,
I'm having a problem with creating a one-to-many(or one-to-one?) relationship in entity framework (3.5 I believe).
Example tables/models:
Settings:
SettingsID pk int not null
SettingsName varchar(250) null
SettingsTypeID fk int null
SettingsType:
SettingsTypeID pk int not null
SettingsTypeName varchar(250)
I have a foriegn key constraint on Settings.SettingsTypeID that referances SettingsType.SettingsTypeID.
Upon saving a setting(with a chosen settingstype) the values save correctly (I have checked the DB to be sure and can see the value of Setting.SettingsTypeID update correctly).
However, upon trying to retrieve a settingType object based on the chosen Setting, e.g.
var SettingsType = Setting.SettingsType;
Setting.SettingsType always comes back null?
Am I missing something or?