Click here to Skip to main content
15,887,214 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi I have this class;
C#
[Table("tblRegions")]
   public class Region : MasterEntity
   {


C#
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 ParentRegion, Country RegionType fieds are created as foreign key fields in DB and ID values saved correctly.

Problem is on retrieving a region, the ParentRegion, Country and RegionType are returned with null values.

Any ideas why am facing this? Its frustrating me.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900