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
I'm using this to get a specific node by it's Doctype alias..
using (var cref = _context.EnsureUmbracoContext())
IPublishedContentCache cache = cref.UmbracoContext.Content;
RitzauListPage = cache.GetAtRoot().FirstOrDefault().Descendants().FirstOrDefault(x => x.ContentType.Alias == "ritzauArticleFolder");
From a another class i'm call my method RitzauController.SyncRitzau();
But when I'm doing that, then _context are null.
I'm trying to get hangfire to run my method.
But if I call my UmbracoApiController method by url then it works.
Any suggentions how to get around that ?
My hangfire method
public void BaselineSync()
RecurringJob.AddOrUpdate("RitzauSync", () => Ritzau(), Cron.Daily(01, 00));
public void Ritzau()
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted