glerler
glerler

Reputation: 39

Piranha CMS - Entity Framework Context

I got my feet wet with using Piranha CMS for a small site. One point I am not sure how to handle is extending the DB and CMS model for site data.

For example, visitors fill out a form and I capture their info. With EF I have created the class and added the dataset to the context then updated the DB via CodeFirst.

What is the suggested method? Create a 2nd context for the site data?

Upvotes: 0

Views: 648

Answers (1)

Håkan Edling
Håkan Edling

Reputation: 2753

If you want to use code first you should store your site data in it's own context. Otherwise there will be a conflict when your extended context tries to create the CMS tables as well.

In future releases the Piranha DataContext will most likely be sealed to avoid confusion.

Upvotes: 1

Related Questions