One to many association relationship in C# | OOP in C# Part-15



What is Association?

Association is a (*a*) relationship between two classes. It allows one object instance to cause
another to perform an action on its behalf. Association is the more general term that define the
relationship between two classes, where as the aggregation and composition are relatively
special.

One-To-Many relationship

There are many scenarios where we can implement a One-To-Many relationship between two classes. For example, think about a student and a course class. One student may be enroll of more than one course. There might be a situation of representing a relationship between a person and a bank account. It is obvious that one person may own more than one bank account. An actual example from our family is that one parent might have many children. The relationship breaks due to a One-To-Many relationship.

Post a Comment

Previous Post Next Post