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 making an Web API that needs to have CRUD methods and I'm stuck at POST. One of the reasons is the title error that I get with this line of code:
IContentService contentService = Services.ContentService;
I've pasted that line from this link: https://our.umbraco.com/documentation/Reference/Management/Services/ConsentService/
Basically, I need to make API POST method that'll, when called, create new child node (just like you can do in the Umbraco backoffice) from JSON that's passed in the request body and from what I've seen, I need ContentService in order to make that possible (if there's a better way to do that, please post it). Thanks in advance!
EDIT: I've solved that error by putting contentService in the POST method body (I've declared it globally first).
Do you want the ConsentService or the ContentService?
You are linking to the ConsentService.
But you can use the following:
IContentService contentService = ApplicationContext.Current.Services.ContentService;
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted