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
Upgrading code files from U7 to U8. The following line of code now throws error CS0103: The name 'ApplicationContext' does not exist in the current context.
var db = ApplicationContext.Current.DatabaseContext.Database;
Try var db = DatabaseContext.Database; instead
var db = DatabaseContext.Database;
@Henrik That doesn't exist like that in v8 either ;-)
@Rob see my answer here: https://our.umbraco.com/forum/umbraco-8/96175-cant-find-applicationcontext#comment-304141
Alrighty. Was worth a try :)
Had the same issue, but with ApplicationContext.Current.Services.RelationService; and it working for me removingApplicationContext.Current.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted