Quantcast
Channel: patterns & practices: Project Silk
Viewing all articles
Browse latest Browse all 93

New Post: Do I need to call Tolist() methods for these layers?

$
0
0

Hi Weera,

Regarding the call to the helpers methods you mentioned, take into account that these methods are used to delegate logic and as far as I know which behavior you will obtain when calling them, will depend on the particular logic they execute. In other words as mentioned above, this will depend on your design choices and on how you implemented your Data Access Layer, as those considerations are also valid for WPF applications.

On the other hand regarding how to track the entities from your view models, I believe a possible approach to achieve this could be for example to consume a service from your view models, which could wrap your Repository implementation and contain the necessary logic to keep track of these entities and their corresponding changes. For example this service could expose the necessary properties and also raise events when those properties are changed.

As a possible example of this approach, I recommend you to check the Stock Trader Reference Implementation provided with Prism. Although it does not use the Entity Framework, this should not be a problem as your view models should not depend on your data retrieval mechanism.

I hope you find this useful,

Agustin Adami
http://blogs.southworks.net/aadami


Viewing all articles
Browse latest Browse all 93

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>