Persisting Taxa Metadata on Content Items

Posted by Community Admin on 05-Aug-2018 23:12

Persisting Taxa Metadata on Content Items

All Replies

Posted by Community Admin on 26-May-2011 00:00

I'm using Sitefinity 4.1.1405.0. I'm creating an Event using the fluent API and one of my custom fields on Events contains taxa.  I previously persisted this data as IEnumerable<Guid>, but after upgrading, this is now throwing the exception "Object must implement IConvertible".

Here is the code I'm using to persist the taxa metadata:

App.WorkWith().Event().CreateNew().Do(ev =>
     IEnumerable<Guid> taxa = GetSelectedTaxa();
     ev.SetValue("IndexTags", taxa);
).SaveChanges();

The metadata field contains flat taxa.  Which data type should be used for persistence?

Thanks.

Posted by Community Admin on 27-May-2011 00:00

Hi Geoff,

The correct way to associate item with taxa is documented here.

Best wishes,
Ivan Dimitrov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

Posted by Community Admin on 27-May-2011 00:00

That worked great!  Thank you!

This thread is closed