using System.Data.Objects.DataClasses; public class Customer { public int CustomerID { get; set; } public EntityRefOrder { get; set; } } public class Order { public int OrderID { get; set; } }
using System.Data.Objects.DataClasses; public class Employee { public int EmployeeID { get; set; } public string EmployeeName { get; set; } public EntityRefIn this example, we have an Employee class that has an EntityRef to another Employee object, which means that an Employee can have a Manager. EntityRef is part of the System.Data.Objects.DataClasses namespace, which is included in the Entity Framework library.Manager { get; set; } }