V
V
Vadim Ivanenko2015-04-24 01:02:00
.NET
Vadim Ivanenko, 2015-04-24 01:02:00

Is it acceptable to create view models that have links to each other?

class ParentVM { ChildVM ChildVM }
class ChildVM { ParentVM ParentVM }
... var user = this.ParentVM.MoreParentVM.SignInVM.CurrentUser;
It turns out that you can wander into any VM from any other VM. I did it by analogy with DataModel and Entity. It's convenient, but is it right?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
AxisPod, 2015-04-24
@AxisPod

Well, if you later remove cyclic references, then use it to your health, otherwise your memory will leak.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question