Assuming that a department must contain more than one employee, which I believe it should be,then this can be
One-to-many
or
Many-to-many
. If the policy allow an employee to participate only one department, then it is
One-to-many
. If it allows more than one department it will be
Many-to-many
relationship. So you need to create an association class between employee and department say
EmpDept
.
So for your case, you don't have to create any association class.Here is what it looks like
public class Employee(){
public Department Department {get;set;};
public int Id {get;set;}
public string Employee_Name {get;set;}
public Employee() {
}
}
public class Department {
public List<Employee> Employees {get;set;}
public Department_Id {get;set;}
public string Department_Name {get;set;}
public Department() {
}
}