This project is read-only.
  • OneToMany: Means one instance of the current object to many instances of the type in the relational attribute, for example:

	     //This is the Customer class
        [OneToMany(typeof(CustomerOrders), RelationColumn = "CustomerId")]
        public virtual IList<CustomerOrders> CustomerOrders

The code above states that One instace of the Customer class to many instances of the CustomerOrders class. So the value “CustomerId” assigned to the RelationColumn is a column in the CustomerOrders table which is a foreign key to the Customer table, that happens to be the Customers primary key.

Last edited Feb 23, 2010 at 2:32 PM by ahmedsalako, version 2


No comments yet.