Tuesday, 3 August 2021

Glass-mapper-ienumerableguid-to-ienumerableobject

 Glass Mapper IEnumerable<Guid> to IEnumerable <Object>

You can set a custom type on your multi-list field that will be used during code generation by setting the "Custom Data" property of the field in TDS:

Custom Data.

In your case, if you set this to "generic=Namespace.OtherSitecoreTemplate" the stock code generation templates for TDS will generate as IEnumerable<OtherSitecoreTemplate>

As an aside, this is where you'd set the type for Link fields. If you use the string "type=OtherSitecoreTemplate" it will strongly type the field to the value provided.

No comments:

Post a Comment

Extracting Nupkg files using command line

Rename it to zip first then extract files as below 1.     Rename-Item -Path A_Package.nupkg -NewName A_Package.zip 2.     Make sure to repla...