ViewComponent Model failed to retrieve <Guid>("key") property value
I have a ViewComponent Model from where I want to retrieve a number of properties, which I successfully do but the "Key" (alias "key") fails to yield the desired value and instead it gives me a bunch of zeros. When running on debug, I can see the Guid value of the key property is indeed there, but it never assigns it, here is the snippet:
In the image there is a field below the "Key" and "Static members" labelled "Empty" and against it the value is a bunch of zeros {00000000-0000-0000-0000-000000000000} that is what I get instead of the Key value
ViewComponent Model failed to retrieve <Guid>("key") property value
I have a ViewComponent Model from where I want to retrieve a number of properties, which I successfully do but the "Key" (alias "key") fails to yield the desired value and instead it gives me a bunch of zeros. When running on debug, I can see the Guid value of the key property is indeed there, but it never assigns it, here is the snippet:
"public Guid ModuleId => _blockListItem.Content.Value
Has anyone come across this?
Thank you in advance,
Mani
I just want to add the following:
In the image there is a field below the "Key" and "Static members" labelled "Empty" and against it the value is a bunch of zeros {00000000-0000-0000-0000-000000000000} that is what I get instead of the Key value
Hi Mani,
Have you tried
_blockListItem.Content.Key
?Hi Huw,
It never occured to me to do that, but it worked :)
Thank you so much!
Mani
is working on a reply...