My db looks somthing like this:
MyEntity State
----- -----
id id
street name
stateId ...
zip
status
...
My Model looks like this:
class MyEntity
{
int id { get; set; }
Address location { get; set; }
string status { get; set; }
// ...
}
class Address
{
string street { get; set; }
string zip { get; set; }
State state { get; set; }
// ...
}
class State
{
int id { get; set; }
string name { get; set; }
// ...
}
I'm a little uncomfortable with my address component referencing an entity. Smells like a poor model. Is it? If not, how would I map this (preferably with fluent nhibernate)?