Persisting Taxa Metadata on Content Items - Front- & Back-End Development - Front- & Back-End Development - Progress Community
 Front- & Back-End Development

Persisting Taxa Metadata on Content Items

  • Persisting Taxa Metadata on Content Items
  • 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.
  • 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 >>
  • That worked great!  Thank you!