You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Accessing the Value IEnumerable produces a RuntimeBinderException.
using Kontent.Ai.Management.Models.LanguageVariants.Elements;using Kontent.Ai.Management.Models.Shared;using Kontent.Ai.Management.Models.Types.Elements;vartaxonomy=new TaxonomyElement
{Element= Reference.ByCodename("my_taxonomy"),Value=[Reference.ByCodename("my_taxonomy_item_1")]};vartaxonomy2=(TaxonomyElement) TaxonomyElement.FromDynamic(taxonomy.ToDynamic(), ElementMetadataType.Taxonomy);varvalue1= taxonomy2.Value.First();
Exception message: 'Kontent.Ai.Management.Models.Shared.Reference' does not contain a definition for 'id'
Stack trace
at System.Dynamic.UpdateDelegates.UpdateAndExecute1[T0,TRet](CallSite site, T0 arg0)
at Kontent.Ai.Management.Models.LanguageVariants.Elements.BaseElement.<>c.<FromDynamic>b__6_5(Object identifier)
at System.Linq.Enumerable.SelectEnumerableIterator`2.MoveNext()
at System.Linq.Enumerable.TryGetFirst[TSource](IEnumerable`1 source, Boolean& found)
at System.Linq.Enumerable.First[TSource](IEnumerable`1 source)
at Program.<Main>$(String[] args) in D:\repos\demo\KontentAiMigrationAssistant\KontentAiMigrationAssistant\Program.cs:line 42
I also tried with Reference.ById and Reference.ByExternalId for the Value item and all produced the same exception.
Test environment
Platform/OS: .NET 8.0
Version: 6.0.0
The text was updated successfully, but these errors were encountered:
hello and thanks for the submission, as well as the draft PR. I'll review the issue and the proposed changes but feel free to add further improvements before marking the PR for review.
Description
Accessing the Value IEnumerable produces a RuntimeBinderException.
Exception message:
'Kontent.Ai.Management.Models.Shared.Reference' does not contain a definition for 'id'
Stack trace
I also tried with
Reference.ById
andReference.ByExternalId
for the Value item and all produced the same exception.Test environment
The text was updated successfully, but these errors were encountered: