I have a repository that has several specifications available. For Ex. I can call: EmployeeRepository.EmployeeSpecification().ForRegion("West Coast").Executives().OrderByLastName().OrderByFirstName().Page(1, 10). This will return me a result package containing the results array and metadata created by the specifications such as how many pages are available, total records processed, and execution times... The specifications are not classes, they are just methods defined by IEmployeeSpecification.
I am trying to find a way to pass this information into the service layer. How can I setup a service layer call to handle these specifications. I may want to call just Executives().OrderbyLastName() one time then turn around and call ForRegion("Central").Page(5, 10).
My goal is to setup the service call such as: Service.GetEmployees(Specifications specifications) where specifications would allow me to list which repository specs to execute, each specs parameters, and the order to execute.