I'm trying to get a custom database running with Umbraco 8. Have been searching the web for information about how to do this. I've stumbled upon a few pages about creating a component but I would like to see a working example of the whole thing (creating db, inserting, reading etc.). Thankful for help!
Umbraco doesn't prescribe a way to fetch data from custom tables, as it's really out of scope, how you manage data is the same as any other .Net application.
The Umbraco team use NPoco as a simple ORM, for managing data:
Umbraco 8 custom database example
Hi!
I'm trying to get a custom database running with Umbraco 8. Have been searching the web for information about how to do this. I've stumbled upon a few pages about creating a component but I would like to see a working example of the whole thing (creating db, inserting, reading etc.). Thankful for help!
Umbraco doesn't prescribe a way to fetch data from custom tables, as it's really out of scope, how you manage data is the same as any other .Net application.
The Umbraco team use NPoco as a simple ORM, for managing data:
https://github.com/schotime/NPoco
You could use it or you could use any other ORM or data access strategy.
This is from the official Umbraco docs:
https://our.umbraco.com/Documentation/Extending/Database/
Here's a GitHub repo kindly shared by Kevin Jump with examples on how to hook up services and repositories:
https://github.com/KevinJump/DoStuffWithUmbraco/tree/master/Src/DoStuff.Core/RepoPattern
I hope this helps.
Thanks! I'll take a look...
is working on a reply...