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?
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.
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
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.
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.
is working on a reply...