IMPORTANT: This version of Sitefinity CMS is out of support and the respective product documentation is no longer maintained and can be outdated. Use the version selector to view a supported product version.
When using Entity Framework (EF) with Sitefinity CMS, Thunder generates all the files needed to plug-in EF into Sitefinity CMS. The custom module uses EF Code First approach. For more information, see https://msdn.microsoft.com/en-us/data/jj193542.aspx.
Once you have setup your module using the Custom module project template, you can add another or change the existing content types, while you are developing. Thunder creates all the new CRUD operations in the manager and the data provider. It adds all the new EF mappings and creates the new Master-detail views as Sitefinity CMS backend pages.
NOTE: If you change your mappings or your model, you must use EF Code First Migrations in order to apply the changes to the database. An alternative to the manual migrations are the Automatic Code First Migrations. It is up to you to decide which one to use.
The following example uses Automatic Code First Migrations with a custom module, named CustomModule1.
EF creates all the database tables that are current in your Code First model.
NOTE: If you want to change or to add a new entity to your model, using our Sitefinity CMS Custom Content Type item template, you must execute the Update-Database command above.
Back To Top
To submit feedback, please update your cookie settings and allow the usage of Functional cookies.
Your feedback about this content is important