Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I am fairly new to Umbraco but I have some questions.
So while playing with it I think the set up of Umbraco is fairly easy. Adding content, editting content and so on can be done in no time. But when it gets more complex, I do no know how to get things done in Umbraco. Because I have experience in MVC3, I converted my Umbraco project to MVC. It's not 100% the same but I can live with it (for now).
I have some data that I should store for my business logic. But how can I do that? Should I create a separate database to store that data and work with the Entity Framework to create, delete, retrieve the database? Or should I work with wat Umbraco offers? I want to now how people do this kind of stuff in Umbraco because that is not clear to me. Do they have tutorials on this?
Thanks in advance!
I would say so yes. Unless the data you are storing is something you want to model and store in Umbraco itself - i.e. using the document types and storing and retreiving as standard Umbraco content.
If not, then yes a custom database (or custom tables in the same database) is a good way to go. You can use any data access technique you are comfortable with. Other than some extensions Umbraco has provided for PetaPoco that it uses internally for data access, I'm not aware there's any preferred way to go for this type of thing - so EF would be fine.
Here is a simple example of CRUD with Umbraco 6: http://www.nibble.be/?p=224
Yes but that example uses Umbraco to store the data in Document Types and they are not as flexible as a separate database (relationships etc.). So I will go for a separate database with EF or some other ORM tool.
I would not boughter to implement EF cause umbraco allready has peta poco running. And therefor dont make a new database just append the tables u need to umbracos. and use that as your ORM.
var database = ApplicationContext.DatabaseContext.Database; gives u the database like in EF
And the database Service uses and interface so u can deperency inject that into your controllers if thtat turns you on :)
is that what u are looking for ?
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted