I am learning asp.net mvc, and in my test project I have some problems with inheritance: In my model, I use inheritanse in several entities:
public class Employee:Entity
{
}
This is the base class. And the descendants:
public class RecruitmentOfficeEmployee: Employee
{
public virtual RecruitmentOffice AssignedOnRecruitmentOffice { get; set; }
}
public class ResearchInstituteEmployee: Employee
{
public virtual ResearchInstitute AssignedOnResearchInstitute { get; set; }
}
I want to implement simple CRUD operations for each element.
What is the best way to implement controllers and views among descendants: - One controller for each descendant; - Inheritance of the controller;
- general controller; - General methods in one controller.
Or maybe there is another way?
ORM - NHibernate, , . -, - , , .
, )