if it's just a List<string>, it has native support by IList<T>, you don't even need StringDictionary for that
So the way to go is:
Thanks (again)! :)
It's worth noting that StringDictionary is not just a string list - it is a "dictionary", so you can define pair like <"hello","world">
Of course if you are using StringDictionary as just a string list then it'll work :)
I just tried it, and I get an exception about List<string> "can not be mapped to a MetaDataType" :(
You probably need [BackingType(typeof(PropertyStringList))] attribute :)
Cool, everything works now. I hope. Still haven't gotten to updating the importers, but at least nothing crashes so far :)
Thanks again for you help!!
So, I'm in the process of upgradering a CMS+Commerce solution from 7.5 to 11.8.5.
The site uses a StringDictionary metafield, and this has been discussed at length throughout the years.
My question now is - what is the recommended way of storing a List
on a catalog content type?
I had a look at https://world.episerver.com/forum/developer-forum/Episerver-Commerce/Thread-Container/2014/7/MetaDataTypeStringDictionary-from-code/, but that discussion is very old, so I was thinking there must be a better/simpler way today?
That code also crashes the CMS part of the site, with "Type '[...].StringDictionary' could not be mapped to a PropertyDefinitionType"...