While designing a new multi-tier application, I am facing difficulty making a decision for my DAL and BLL layer design.
Suppose I have Employee information spread in multiple tables having both 1-1 and 1-Many relationship with master table. Few are listed below:
Employee (Master Table),
Employee_Contact_Detail,
Employee_Education,
Employee_Skill,
Employee_Experience
At DAL level, I have a generic data repository providing common functionality like GetAll, GetSingle, Add, Edit, Delete for each table.
Now, should I design my “Employee Data Repository” derived from my “Generic Data Repository” and add functions for all related tables listed above in a single class like GetEmployeePersonalDetail, GetEmployeeContactDetail, GetEmployeeEducation, AddEmployeePersonalDetail, EditEmployeePersonalDetail etc. In this way I would gain very less benefit for “Generic Data Repository”. The other way is that I create (and derive from Generic Repository) a separate data repository for each table and then create a single class at business logic layer for “Employee”.
EDIT
If I go for the "separate data repository for each table" option, at DAL level and then instead of "single business logic class" for “Employee”, if I create separate business logic classes, corresponding to each data repository, will it be indecent approach keeping in view the scenario?
Thank you very much for your guidance.