0

I've created a custom user profile and attached it to a user type. When I do a GetUser and tell it I want the profile properties, is there a mechanism to map this data to a Glass model, or is this better handled strictly the "Sitecore" way?

1

Glass mapper is for mapping Sitecore items to Glass models. That's all it was designed to do. Don't try to shoehorn it into mapping things it wasn't designed for. Just use the Sitecore API and create a model.

If you really must use a tool to do the mapping for you instead of just writing the code. Then have a look at AutoMapper, that is designed to map from one model to another. But if you are only doing this once, I'd say the overhead for that is not worth it.

  • Cool, thanks. Since the profile technically is a template at heart (though it's in core), I thought I'd check before I do any manual modeling. – Ken McAndrew Jul 12 '19 at 19:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.