I am starting a project and struggling with architecture for our level of data access. In principle, he will need to interact with several backends with various database projects.
I need a generic DAL, which then performs a generic function in any backend. Backends have a unique code for inserting, updating, etc. So adding Employee to 1 backend will have different code in another.
I tried the repository template, but this does not apply to the situation. I ended up with the Factory template method, but ended up creating a Factory for each object. I could only create 1 Factory, but then the Backend object would have a hundred functions, such as "SaveEmployee", "SavePlan", etc.
Now I have the following:
DAL
--> DAL.Backend1
--> Employee.Save(employee)
--> Plan.Save(plan)
--> DAL.Backend2
--> Employee.Save(employee)
--> Plan.Save(plan)
DAL Factory Object, Employee, Plan, , DAL .
, , , .