I agree with @MikeC. Separate BLL in namespaces for each segment. Also, separate the DAL, for example:
- MyCompany.HumanResources.DAL
- MyCompany.Insurance.DAL
Another thing is to separate the dll . This way you do not need to publish DAL. This will be the business layer (e.g. WCF or web service) responsible for BLL and DAL for each system, simplifying support and maintenance . I donโt know if its the most affordable approach for your company right now (in terms of complexity), but is better suited for design purposes .
In advance, the applications developed here at the company used a component architecture - sharing components through applications . We realized that this is not the best design, and today many systems (in the production environment) use this design.
In addition: if you need extra complexity, you can also create a common dbHelper component, which is responsible for maintaining data access, including operations that control connections, commands and transactions. Thus, preventing code rewriting. This assembly may use the Corporate Library or other components. Operation example:
public DbCommand CreateCommand() { if (this._baseCommand.Transaction != null) { DbCommand command = this._baseConnection.CreateCommand(); command.Transaction = this._baseCommand.Transaction; return command; } return this._baseConnection.CreateCommand(); }
You can make it virtual, implement SqlCommand CreateCommand, etc.
Recalling: The general idea of โโdbHelper that I revealed is just an idea !
Erup source share