Repository Pattern with Entity Framework 3.5 and MVVM

Posted by Ravi on Stack Overflow See other posts from Stack Overflow or by Ravi
Published on 2010-04-14T09:49:10Z Indexed on 2010/04/15 17:53 UTC
Read the original article Hit count: 1058

I am developing a Database File System. I am using -

  1. .Net framework 3.5
  2. Entity Framework 3.5
  3. WPF with MVVM pattern

The project spans across multiple assemblies each using same model.

One assembly,let's call it a "server", only adds data to the database using EF i.e. same model.Other assemblies (including the UI) both reads and writes the data.The changes made by server should immediately reflect in other assemblies.

The database contains self referencing tables where each entity can have single OR no parent and (may be) some children. I want to use repository pattern which can also provide some mechanism to handle this hierarchical nature.

I have already done reading on this on Code Project. It shares the same context(entities) everywhere.

My question is - Should I share the same context everywhere? What are the advantages and disadvantages of doing that?

© Stack Overflow or respective owner

Related posts about wpf

Related posts about mvvm