If I have the following existing table schema
+-------------------+ +-------------------+
| Address | | Country |
+-------------------+ +-------------------+
| Line1 | +--->| CountryId |
| Line2 | | | Name |
| City | | +-------------------+
| State | |
| Zip | |
| CountryId |---+
+-------------------+
...and my class is as follows
public class Address
{
public virtual string Line1 { get; set; }
public virtual string Line2 { get; set; }
public virtual string City { get; set; }
public virtual string State { get; set; }
public virtual string PostalCode { get; set; }
public virtual string Country { get; set; }
}
...how do I configure my mappings so that the Country (string)
property contains the [Name]
column from the [Country]
table?