There is an easy way to solve the following problem.
Let's say I bring an IList with some books in my controller from my model. Now I want to enrich the output and get a preview from Amazon with another model from the external structure and get another IList.
Now I put both Eilists in a bag of properties.
In NVelocity, I use #foreach for BookList, but how can I access the amazonbook list with preview privileges? I cannot use $ amazonbook [index], where index will be isbn. Do I need to put both lists in one big list with a simple onject containing only two other objects?
Remember that both models are from different frameworks and cannot be placed in the same structure. Both structures must remain separated. I am trying to solve the problem of NVelocity and, of course, this problem is just an example, we do not sell books;)
source
share