Copied to clipboard

Flag this post as spam?

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


  • Nick Bloodworth 23 posts 96 karma points
    Feb 17, 2019 @ 20:22
    Nick Bloodworth
    0

    Entity franework in Umbraco

    Hi, I'm looking to build a website for league tables. Each league will have different divisions, comprising different teams, each comprising different players. I aim to use EF for this.

    My issue is that the client would like to edit the front page of the website himself, and have a blog. This I'll use Umbraco for.

    All good so far, my question is how do I call views created in EF in Umbraco? I'd like to use the same database for EF and Umbraco. Would it be easier to not use EF and use PetaPoco or something?

    Thanks Nick

  • Chris Evans 137 posts 353 karma points c-trib
    Feb 17, 2019 @ 20:40
    Chris Evans
    2

    Umbraco is just a .NET web application, using a SQL Server database. So you're totally able to add your custom tables to the same SQL database, and query it using an ORM or custom data access code that you prefer (EF, PetaPoco, Dapper, Linq to SQL, whatever).

    You can have this running side-by-side with the Umbraco rendering engine no problem, as long as your table names don't conflict with the required Umbraco tables. Your Umbraco views can load in data via your custom code and display that alongside Umbraco managed content.

    You can even create a custom dashboard inside Umbraco to manage that data in the backoffice if necessary, so that the editor can update everything in the same interface. You can use some of the same angular directives and css styles that the Umbraco admin system has to keep the UI consistent.

    Basically, Umbraco is designed for exactly this kind of extension and integration. There are lots of useful pages in the documentation about these concepts, as well as decent blog posts online - check out things like Skrift.io and 24 days in Umbraco for some good articles about a variety of topics.

  • Nicholas Westby 2054 posts 7103 karma points c-trib
    Feb 18, 2019 @ 00:01
    Nicholas Westby
    2

    One option in case you want the tables to be editable relatively easily in the Umbraco back office would be to use Fluidity: https://umco.github.io/umbraco-fluidity/overview/ui-concepts/

    I believe it can use any data source, so long as you create a repository for it: https://umco.github.io/umbraco-fluidity/api/repositories/

    It will then create a CRUD GUI for you.

Please Sign in or register to post replies

Write your reply to:

Draft