Jobs module: Create the manager
The manager operates on job application providers which inherit from JobsDataProviderBase. The component to use when you want to work with the model is the manager.
To implement the manager, perform the following:
- In Visual Studio, in your project, open the context menu of the solution and click Add » New Item...
- In the left pane, select Visual C# » Code.
- Click Class and in the Name input field, enter JobsManager.cs
- Open the JobsManager.cs file.
- Change the class definition.
- Define the constructors.
- Specify the module name.
- Define the provider.
- Define the GetManager method.
- Implement the CRUD operations.
- Override the GetItems method.
- Implement the members required by the IContentLifecycleManager interface.
Although the Jobs module does not support content lifecycle, the implementation of the interface is mandatory for the manager class.
EXAMPLE: For more information about the contents of the file, refer to class JobsManager.cs
from the downloaded sample project.
In this class, JobsManager inherits from ContentManagerBase and IContentLifecycleManager. ContentManagerBaseJobsDataProviderBase specifies the base class of the providers that this manager works with. ConfigElementDictionary<string, DataProviderSettings> ProvidersSettings is a dictionary, defined in JobsConfig, that contains available providers. You define JobsModule and JobsConfig in later steps of this tutorial.