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
Can I use the SaveAndPublishWithStatus-Function asynchron?
I'm trying to use it in a method but I always get a NullReferenceException.
Im trying something like this (minimal exampel)
foreach (var elem in e.SavedEntities.Where(n => n.ContentType.Alias.Equals("repository") && n.IsNewEntity())) { new System.Threading.Tasks.Task(() => { asynchelper(sender, elem.Id); }).Start(); }
with this function
private void asynchelper(IContentService sender, int pid) { IContent c = sender.CreateContent("Test", pid, "ordner"); sender.SaveAndPublishWithStatus(c); }
I get this error:
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
SaveAndPublishWithStatus async
Can I use the SaveAndPublishWithStatus-Function asynchron?
I'm trying to use it in a method but I always get a NullReferenceException.
Im trying something like this (minimal exampel)
with this function
I get this error:
is working on a reply...