vendredi 20 novembre 2015

Factory class access to DAL Layer

I have a business logic layer(BLL) and data access layer(DAL). DAL layer is injected as IUnitOfWork into BLL with Unity.

I am doing all DB operations with IUnitOfWork inside BLL but now I need to inject an abstract factory into BLL. One of the factory implementation need to pull some data from database. What I did is to inject IUnitOfWork to that factory in the constructor and factory itself have access to DAL layer. Can you tell me if this is acceptable? Should other classes other than BLL have access to IUnitOfWork? Is this violation of good practices?

Aucun commentaire:

Enregistrer un commentaire