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 http://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