I have a large 'Manager' class which I think is doing too much but I am unsure on how to divide it into more logical units.
Generally speaking the class basically consists of the following methods:
class FooBarManager { GetFooEntities(); AddFooEntity(..); UpdateFooEntity(..); SubmitFooEntity(..); GetFooTypes(); GetBarEntities(); }
The Manager class is part of my business logic and constains an instance of another "Manager" class on the data access level which contains all CRUD operations for all entities.
I have different entities coming from the data access layer and therefore have a converter in place outside of the Manager class to convert data entities to business entities.
The reason for the manager classes was that I wanted to be able to mock out each of the "Manager" classes when I do unittesting. Each of the manager classes is now over 1000 loc and contain 40-50 methods each. I consider them to be quite bloated and find it awkward to put all of the data access logic into a single class. What should I be doing differently?
How would I go about splitting them and is there any specific design-pattern should I be using?