I was using the following code in Umbraco 7.2.0 to get all the Pre Values for a Data Type. Since upgrading to Umbraco 7.4.3, I can no longer initialize the DataTypeService with no parameters. Now it requires:
What are these values? Before I could initialize it like this:
using Umbraco.Core;
using Umbraco.Core.Models;
using Umbraco.Core.Services;
...
DataTypeService dts = new DataTypeService();
var preValues = dts.GetPreValuesCollectionByDataTypeId(myId));
Get Pre Values for Data Type
Hi,
I was using the following code in Umbraco 7.2.0 to get all the Pre Values for a Data Type. Since upgrading to Umbraco 7.4.3, I can no longer initialize the DataTypeService with no parameters. Now it requires:
What are these values? Before I could initialize it like this:
The DataTypeService documentation doesn't appear to be updated to explain this change. https://our.umbraco.org/documentation/Reference/Management/Services/DataTypeService
Any help would be appreciated.
Many thanks,
Nathan
I managed to fix this issue by following the advice in this thread:
https://our.umbraco.org/forum/developers/api-questions/71765-testing-73-contentservice-c-new-contentservice
My data type service initializer now looks like this:
is working on a reply...