# Mapping Guid to ProductModel?

**URL:** <https://forum.litium.com/t/mapping-guid-to-productmodel/1665>\
**Category:** Questions\
**Created:** [September 24, 2020, 2:17pm UTC](https://forum.litium.com/t/mapping-guid-to-productmodel/1665 "2020-09-24T14:17:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robin.w](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/robin.w/32/75_2.png) [@Robin.w](https://forum.litium.com/u/Robin.w)\
**Post date:** [September 24, 2020, 2:17pm UTC](https://forum.litium.com/t/mapping-guid-to-productmodel/1665/1 "2020-09-24T14:17:09Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![NilsN](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/nilsn/32/302_2.png) [@NilsN](https://forum.litium.com/u/NilsN)\
**Post date:** [September 24, 2020, 3:27pm UTC](https://forum.litium.com/t/mapping-guid-to-productmodel/1665/2 "2020-09-24T15:27:59Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/litium/original/1X/12eddac3b8b661de1db86af10ac8151b571e6fb9.png) [@system](https://forum.litium.com/u/system)\
**Post date:** [October 22, 2020, 3:28pm UTC](https://forum.litium.com/t/mapping-guid-to-productmodel/1665/3 "2020-10-22T15:28:05Z")

</div>

Closed on October 22, 2020, 3:28pm UTC

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