Data-type's raw value map/convert to eg. IPublishContent
Hi, can anyone help me with the following.
I need to save the value of a specific DataType in separate table as string field, for example an Our.Umbraco.Vorto datatype, only its value eg. {"values":{"en":"Lorem ipsum","de":"Dolor sit amet"},"dtdGuid":"00000000-0000-0000-0000-000000000000"}.
So far so good.
Now, however, I am reading back this db string field and would like to return it to the IPublishedContent again with the existing Vorto propery converter. I've looked at these property converters but all the instructions are how to make your own property converter, not how to use an existing one.
So, for a concrete example, how to map a raw string (json) back to the IPublishedContent, based on original data type which was Vorto.
Let's say if there is a function, where you specify the json string and the data type alias (or id) and it returns the IPublishedContent to you (or other corresponding type, though most of complex types are IPublishContent or IEnumerable<IPublishContent>).
Vorto is just an example. It could be NestedContent, NuPicker...
Data-type's raw value map/convert to eg. IPublishContent
Hi, can anyone help me with the following.
I need to save the value of a specific DataType in separate table as string field, for example an Our.Umbraco.Vorto datatype, only its value eg. {"values":{"en":"Lorem ipsum","de":"Dolor sit amet"},"dtdGuid":"00000000-0000-0000-0000-000000000000"}.
So far so good.
Now, however, I am reading back this db string field and would like to return it to the IPublishedContent again with the existing Vorto propery converter. I've looked at these property converters but all the instructions are how to make your own property converter, not how to use an existing one.
So, for a concrete example, how to map a raw string (json) back to the IPublishedContent, based on original data type which was Vorto.
Let's say if there is a function, where you specify the json string and the data type alias (or id) and it returns the IPublishedContent to you (or other corresponding type, though most of complex types are IPublishContent or IEnumerable<IPublishContent>).
Vorto is just an example. It could be NestedContent, NuPicker...
Regards,
/Asembli
is working on a reply...