0

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?

Laurel
  • 5,965
  • 14
  • 31
  • 57
glerler
  • 39
  • 8

1 Answers1

1

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.

Laurel
  • 5,965
  • 14
  • 31
  • 57
Håkan Edling
  • 2,723
  • 1
  • 12
  • 15
  • Thanks for the reply. So a separate contexts is the direction you are going in the future? I would think that would be preferred model to follow then. Glen – glerler Aug 06 '14 at 22:17