Copied to clipboard

Flag this post as spam?

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


  • steschu 88 posts 489 karma points
    Feb 08, 2019 @ 08:14
    steschu
    0

    Which ORM - petapoco - npoco - EF

    Hi,

    As I heard the ORM out of the box for Umbraco 8 will be NPoco instead of PetaPoco (since PetaPoco doesn't seem to be under development any more).

    Is this still true?

    I would also ask, are there any disadvantages when I use EF as ORM? I work a lot with Entity Framework in other projects and so I could save a lot of time not having to get used to another ORM like PetaPoco or NPoco. Should I deinstall default ORM in Umbraco?

    Kind regards, Stephan

  • Kevin Jump 2306 posts 14669 karma points MVP 7x c-trib
    Feb 08, 2019 @ 09:42
    Kevin Jump
    101

    Hi,

    Yeah, your right Umbraco 8 is using NPoco in place of PetaPoco, but that doesn't need to dictate the ORM you use in any Umbraco work.

    Unless you are doing a lot of work with existing Umbraco data (and then you are better doing that through the services) or your data is closely tied to it, I would say use the ORM you are most comfortable with*

    I don't there is no real disadvantage to using EF with Umbraco beyond installing and setting it up (although I am not sure about .net versions, etc underneath all of that) if that's what you are comfortable using for an ORM then no reason not to use it.

    Then for points of overlap with Umbraco, you should use the Service layer to get the data/keys and feed them into your data/service layer - keeping the two separated like this will protect you from changes to the schemas make porting between versions a little easier when the time comes.

    If however, you are looking to do something fairly closely coupled to Umbraco, you might want to look at something like fluidity or UI-O-Matic which do a lot of heavy lifting for you and give you UI inside Umbraco to manipulate data.

    *if you are writing a package other may download and use, then yeah you might want to stick to Umbraco ORM so others don't need all the other stuff

  • steschu 88 posts 489 karma points
    Feb 15, 2019 @ 12:15
    steschu
    0

    Hi Kevin,

    Thanks for your reply. That was very helpful. I will also have a look at the fluidity and UI-O-Matic packages. Although I am always very conservative using 3rd party components since you never know when they're suddenly stopped in development...

    Cheers, Stephan

  • Marcio Goularte 372 posts 1344 karma points
    Feb 15, 2019 @ 14:58
    Marcio Goularte
    0

    For the curious, the petapoco came back to be developed. There are updates in the official repository.

    https://github.com/CollaboratingPlatypus/PetaPoco

Please Sign in or register to post replies

Write your reply to:

Draft