Mapping Guid to ProductModel?

We get a nice way to get a pageModel via automapper:

var pageMode = siteSettingViewModel.CurrentPageSystemId.MapTo<PageModel>())

Can I somehow do somthing similar with ProductModel like
siteSettingViewModel.CurrentBaseProductSystemId.MapTo<ProductModel>()) ?? (This does not work)

Do i need to use BaseProductService and then ProductModelBuilder??

Litium version: 7.4

There’s no converter directly from Guid to ProductModel, but you could first map to BaseProduct and from that map to ProductModel.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.