A
A
andreyAmaterasu2020-07-11 16:38:42
WPF
andreyAmaterasu, 2020-07-11 16:38:42

What is the structure of MVVM in WPF?

I am getting acquainted with the MVVM design partner when writing a WPF application, and no matter how much I searched, I really did not find unambiguous information about where to put the logic of interaction with the database. I understand that the implementation of MVVM may differ, and I think that there is no one right solution, but how can I do it better? I use Entity Framework Core in my application, the application structure is shown on the screenshot. Now I have a data context class and a class that contains methods for interacting with the database (add, delete, get, etc.) placed in the Database directory. Is this the right decision, or should I do something else? And more about the ViewModel, do I understand correctly that the ViewModel should not be alone, and each model and view should have an intermediary in the face of the ViewModel?5f09c088b27ee847620993.png

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question