Sunday, 2 June 2013

EF 5. Code First DbContext Child objects not mapping on retrieving from DB

EF 5. Code First DbContext Child objects not mapping on retrieving from DB

I have this class;
[Table("tblRegions")]
public class Region : MasterEntity
{
      public string Code { get; set; }
      public string Description { get; set; }
      public Region ParentRegion { get; set; }
      public Country Country { get; set; }
      public RegionType RegionType { get; set; }
}
it turns out Region, Country RegionType fields are created as foreign key fields in DB and ID values saved correctly.
Problem

No comments:

Post a Comment