Implementing the provider pattern
Access to job applications is implemented using the provider model pattern, which features clear separation of responsibilities and allows the application to choose from different provider implementations without changing any code. This section provides the steps for implementing the provider pattern for the Jobs module. It demonstrates basic aspects of the use of OpenAccess ORM and Sitefinity’s API for the creation of modules. First, you implement the custom JobApplication model. Then, you define an abstract data provider class to work with the JobApplication model and implement an OpenAccess version of the provider. Finally, you create a manager to work with the provider.
To implement the provider pattern, perform the following:
-
Creating the model
-
Defining the abstract data provider
-
Creating the fluent mappings
-
Creating the OpenAccess data provider
-
Creating the manager
-
Creating the configuration class