Base solution for your next web application
Open Closed

Map Multiple Dto to one viewmodel #1627


User avatar
0
kythor created

HI,

I'm trying to follow the aspnetzero structure.

One of the things I'm struggeling with now is how to map 2 Dto objects to one viewmodel. It's pretty easy with just one, but cant seem to do it with 2. Searching on Google did not provide me with a good solution, and I would like to know if something is built into aspnetzero to do this?

So basicly, I have a View in the presentation layer, and I need UserProfile information and info from a custom Dto I created. Information of both those objects should come together in a single ViewModel.


1 Answer(s)
  • User Avatar
    0
    kythor created

    never mind, found how to do it... Created a new Dto which combines two existing Dto, mapped to the respective entity