How would you model the data on the form where there are multiple reviewers. Do you create multiple collections or use an array and adding a type field? or something else? When I used multiple instances as commented out, it created multiple MainForm_id in the employee table.
//main form
public class MainForm
{
public int Id { get; set; }
public virtual ICollection<Employee[]> EmployeeArray { get; set; }
//public virtual ICollection<Employee> EmployeeReviewing { get; set; }
//public virtual ICollection<Employee> EmployeeSupervisor { get; set; }
//public virtual ICollection<Employee> EmployeeManager { get; set; }
//public virtual ICollection<Employee> EmployeeBigBoss { get; set; }
}
//employee
public class Employee
{
public int Id { get; set; }
public int ProgramEntryId { get; set; }
public int ReviewerTypeId { get; set; }
public virtual MainForm MainForm { get; set; }
public virtual ReviewerType ReviewerType { get; set; }
}
I would not store the collections directly on the MainForm class. Instead I would have a new class that houses both an employeeId and a formId.
///Form
///Employee
///EmployeeType
///EmployeeReview
Then you would simply query your form such that:
reviews at this point would grant you access to the required form and employees of said type who reviewed the form.