In the Umbraco core you have ITagRepository this does read write to the umbraco tags table.
I am trying to pre fill my tags table with some data. I am injecting it into my service. When I try to use it in my service I get error:
Cannot run a repository without an ambient scope.
Also looking at the Repository everything passed into it is null. Is it even possible to use it? If not then how do you do npoco stuff in v8 in v7 you could get the database instance and do stuff.
Using ITagRepository in your service
In the Umbraco core you have ITagRepository this does read write to the umbraco tags table.
I am trying to pre fill my tags table with some data. I am injecting it into my service. When I try to use it in my service I get error:
Also looking at the Repository everything passed into it is null. Is it even possible to use it? If not then how do you do npoco stuff in v8 in v7 you could get the database instance and do stuff.
Regards
Ismail
Hi
When using a repository, you need to wrap the calls in a scope
there is some setup in the service to be able to do this. see this https://github.com/KevinJump/DoStuffWithUmbraco/blob/master/Src/DoStuff.Core/RepoPattern/Services/DoStuffBaseService.cs as an example.
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.