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
Hi!
How do I get an instance of the ITaskService in a standard Umbraco 7.10 installation? I have a webapi controller where I would like to use ITaskService but I cannot get an instance of the interface no matter how I try.
Thanks!
/Kristoffer
I found the solution. Make your controller inherit UmbracoApiController
UmbracoApiController
Then you can use:
var tasks = base.ApplicationContext.Services.TaskService.GetTasks(taskTypeAlias: "toTranslate");
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Get instance of ITaskService?
Hi!
How do I get an instance of the ITaskService in a standard Umbraco 7.10 installation? I have a webapi controller where I would like to use ITaskService but I cannot get an instance of the interface no matter how I try.
Thanks!
/Kristoffer
I found the solution. Make your controller inherit
UmbracoApiController
Then you can use:
/Kristoffer
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.