Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I too am struggling with the bi-directional sync of two collections for use with WPF via MVVM. I blogged <a href="http://blog.alner.net/archive/2010/02/09/mvvm-to-wrap-or-not-to-wrap.aspx" rel="nofollow noreferrer">MVVM: To Wrap or Not to Wrap? How much should the ViewModel wrap the Model? (Part 1)</a> and <a href="http://blog.alner.net/archive/2010/02/09/mvvm-to-wrap-or-not-to-wrap-should-viewmodels-wrap.aspx" rel="nofollow noreferrer">MVVM: To Wrap or Not to Wrap? Should ViewModels wrap collections too? (Part 2)</a> regarding the question, including some sample code that shows a two way sync. However, as noted in the posts, the implementation is not ideal. I would qualify it as a proof of concept.</p> <p>I like the <a href="http://clinq.codeplex.com/" rel="nofollow noreferrer">BLINQ</a>, <a href="http://clinq.codeplex.com/" rel="nofollow noreferrer">CLINQ</a>, and <a href="http://obtics.codeplex.com/" rel="nofollow noreferrer">Obtics</a> frameworks that Alex_P posted about. These are a very nice way to get one side of the sync behvaior. Maybe the other side (from VM to Model) can be implemented via an alternate path? I just posted <a href="http://blog.alner.net/archive/2010/02/09/mvvm-to-wrap-or-not-to-wrap-blinq-and-clinq.aspx" rel="nofollow noreferrer">part 3</a> on my blog that discusses some of this. </p> <p>From what I can see, bi-directional via BLINQ and CLINQ is not supported in cases where the LINQ statement projects the data to a new structure. </p> <p>However, it does look like CLINQ may support Bi-Directional syncing in cases where the LINQ query returns the same datatype as the underlying collection. This is more of a filtering scenario, which doesn't match the use case of a ViewModel wrapping the data in the Model.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload