Hi all,
I have question about Entity Framework. I did a search here but could not find a very good solution. I maybe be using EF in a strange way that is not typical.
Basically I declare a context on the start of my appliction and load the data I need. I'm using MVVM design patern for a C# WPF desktop application with a SQLite backend.
This context is passed to my different ViewModels to load from. They load the entites and create needed VM based on them. Certain Views have a Save button to save the changes for that ONE ViewModel.
Basically I just call the SaveChanges method of my context.
My problem is: I am using one context and there are other VM that are completely unrelated and changes made on these View should only be persisted when the corrosponding save button is pressed.
Is there a way to persist only the entities I choose? (I could handle figuring out which entites to persist very easily) I am sure that MS did not design an ALL OR NOTHING approach with it's changes but I may be using contexts incorrectly.