Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • LostOne 8 posts 78 karma points
    Jan 27, 2021 @ 10:26
    LostOne
    0

    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!

  • Brendan Rice 538 posts 1102 karma points
    Jan 27, 2021 @ 14:03
    Brendan Rice
    1

    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.

  • LostOne 8 posts 78 karma points
    Feb 10, 2021 @ 11:49
    LostOne
    0

    Thanks! I'll take a look...

Please Sign in or register to post replies

Write your reply to:

Draft