Thunder: Develop a custom module using an OpenAccess data provider
The custom module uses OA Code First. Once you have setup your module to use OA with the project template wizard, you can add another or change an existing content type, while developing. Thunder creates all the new CRUD operations in the manager and the data provider. It adds all the new OA mappings and creates the new Master-detail views as Sitefinity CMS backend pages.
For Sitefinity CMS to know that your module has changed, you must refresh its cache. To do this perform the following:
- Open your database and locate table sf_schema_vrsns
For every data access provider Sitefinity CMS stored an entry there. - Find your data provider by its full name - Namespace.TypeName.
For example if your module is named CustomModule1 the full name of the data provider is CustomModule1.Data.OpenAccess.CustomModule1OpenAccessDataProvider.
You can check this in the code generated by Thunder. - Delete this entry from the database.
Following is a sample T-SQL that you must execute:
SELECT * FROM sf_schema_vrsns
WHERE module_name = 'CustomModule1.Data.OpenAccess.CustomModule1OpenAccessDataProvider'
IMPORTANT: Make sure that there is only one result from that query.
DELETE sf_schema_vrsns
WHERE module_name = 'CustomModule1.Data.OpenAccess.CustomModule1OpenAccessDataProvider'
- Restart the IIS where your Sitefinity CMS application is running.
- You must manually uninstall and install your module.
With the new content type that you have created, Thunder has added new backend pages.
These pages are installed automatically when the module installs. Therefore, for the pages to appear in the main backend menu, you must reinstall the module.
To do this, perform procedure Activate and deactivate modules.