Is there a tutorial or book that runs MVVM + DI and uses data from a database in one?

You can find manuals on MVVM and DI, it is somewhat more difficult to get data from the database properly into the GUI.

Finding something that talks about all these things and how they integrate is virtually impossible.

I think some people will say that it does not matter, and everything is independent, but I do not believe in it. Especially considering MVVM and Data, as I believe that I have tight control over data management, making MVVM the hardest part.

So, is there anything that I could use, and I don't want to solve a small simple problem, but something is almost complete, at least the steps from DB to GUI are dynamic. I am ready to pay for such a book.

+4
source share
4 answers

Among many other things, my .NET Injection Dependency book discusses all these things. However, subjects are primarily DIs, with MVVM and data access being only random. However, you can find some code examples that accompany the book.

+1
source

You can see the Prismatic Guide provided by Microsoft Templates and Practice . Prism is actually a complete architectural approach for creating enterprise-level solutions. But it does contain the StockTrader Reference Implementation, which is created using DI, MVVM and includes interaction with the data store (they use XML files as a data store to ensure easy distribution, but no matter which data store is used). In addition, the guide contains several small quick launch projects that emphasize a particular part of the architecture. There is extensive documentation and an active community around Prism, so you can find answers to any question. And it is absolutely free.

+3
source

In addition to the Prism hint already mentioned, I highly recommend Karl Shifflett's MVVM In-the-box tutorial . It has a lot of content and also encourages you to experiment with code while promoting topics (it is integrated with Visual Studio).

enter image description here

+1
source

You may be interested in using the BookLibrary WPF Application Framework (WAF) . BookLibrary shows how to use MVVM, DI with MEF and data management with Entity Framework and SQL Compact Edition.

+1
source

Source: https://habr.com/ru/post/1341429/


All Articles