c# - How to avoid parallel trees -


in many applications use repository pattern , bunch of classes representing model.

the repository accomplishes reading , writing (crud) database leveraging own model objects. these data hierachical in way, e.g. master-details views etc.

but end parallel trees of classes, having 1 tree in model , 1 tree in viewmodels. feels design-flaw.

is there way avoid that? how can expressed better?

i can't see bad here. it's ok have hierarchical view models/views, normal models. moreover, there can more 1 vm hierarchies, depending on use-cases.

if requirements application contains master data, detail data , need display them, can't throw master view , detail view in general.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Socket.connect doesn't throw exception in Android -

iphone - How do I keep MDScrollView from truncating my row headers and making my cells look bad? -