Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
So the site used to access a separate non-umbraco database using var db = new Umbraco.Core.Database("ConnectionString");
What is the equivalent in Umbraco 8?
Hello AsheM
Umbraco uses PetaPOCO as mini ORM, so you can do a query super easy like that:
long count = ApplicationContext.Current.DatabaseContext.Database.ExecuteScalar<long>("SELECT Count(*) FROM articles");
So the equivalent thing in U8 is
var db = new NPoco.Database("connectionString");
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Converting a site from U7 to U8 - How do I access a separate database?
So the site used to access a separate non-umbraco database using var db = new Umbraco.Core.Database("ConnectionString");
What is the equivalent in Umbraco 8?
Hello AsheM
Umbraco uses PetaPOCO as mini ORM, so you can do a query super easy like that:
So the equivalent thing in U8 is
is working on a reply...