Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
150
Entity Framework Hieracrhy
posted

Hello,

 I have an Entity, Company, that has a property exposing a list of child entities, Car.

 For a quick run I created an instance of my Entity:

Company company = new Company() { Name = "Ford", City = "Detroit" };

and then initialized the child entity collection and added two children:

company.Car = new System.Data.Objects.DataClasses.EntityCollection<Car>();

company.Car.Add( new Car() { Name = "Mustang" } );

company.Car.Add( new Car() { Name = "Explorer" } );

I manually defined the schema with my first Band with a Key of, "Company", and the child band to a Key of, "Car".

The parent record is visible, but the child is not.  How should I be doing this?

Thank you,

Blu

Parents Reply Children
No Data