+1-888-365-2779
Try Now
More in this section

Forums / Sitefinity SDK / Persisting Taxa Metadata on Content Items

Persisting Taxa Metadata on Content Items

3 posts, 1 answered
  1. Geoff
    Geoff avatar
    89 posts
    Registered:
    02 Mar 2011
    26 May 2011
    Link to this post
    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.
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    19 Sep 2016
    27 May 2011
    Link to this post
    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 >>

    Answered
  3. Geoff
    Geoff avatar
    89 posts
    Registered:
    02 Mar 2011
    27 May 2011
    Link to this post
    That worked great!  Thank you!
3 posts, 1 answered