Create page from content template (blueprint) - Cannot run a repository without an ambient scope
Hello,
I am trying to create a content page from a content template but it is throwing this exception : System.InvalidOperationException: Cannot run a repository without an ambient scope.
This is the code i am using:
var bluePrints = Services.ContentService.GetBlueprintsForContentTypes(new int[] { 1183 });
var myBluePrint = bluePrints.FirstOrDefault(b => b.Name == "TestJobPageContentTemplate");
var content = Services.ContentService.CreateContentFromBlueprint(myBluePrint, "MDS");
Create page from content template (blueprint) - Cannot run a repository without an ambient scope
Hello,
I am trying to create a content page from a content template but it is throwing this exception : System.InvalidOperationException: Cannot run a repository without an ambient scope. This is the code i am using:
I found this issue (https://github.com/umbraco/Umbraco-CMS/issues/4774) on github with the same exception but it was when creating a node from the CMS.
Thanks
is working on a reply...