c# - MVVM - Model Tutorials? -


I am currently creating a WPF app in C # and I am following it. I have read many articles on MVVM but I am particularly looking for details on everything under the dotted box (hence the model and data access). I already have a local database setup (SQLite) and I'm looking for an efficient way to connect it to my application.

Is any good article or step to make this specific part of MVVM?

There are several ways to deal with this problem and what you choose is the complexity of your application and your data Will be determined on the basis of model.

This approach will be a standard way to see. To create an entity framework model at the top of your SQLite database, it will generate your object model and allow you to attach behavior without much fuss. This is database / firmly somewhat immersed from your application code (View Models). For information about this approach, search Google for 'Entity Framework' - there is a ton of information there. EF 4.0 has improved dramatically after the release.

If you do not want to go with EF (due to complexity, overhead or the desire to roll your own), then you want to start with the Martin Fowellers to read on the popular data source architecture patterns. - This book is a bible of data-driven application architecture. If you do not want to buy the book, read through the description of the pattern, find the appropriate and do a Google search - there is a ton of information about this stuff on the web.

If you have a complex model with the weight of behavior and patterns, then you want to look at the patterns of your model and perhaps the data source pattern out of your DB and in your model. This is the most complex approach, but if you need it, then complexity closes in flexibility under the road.

If your data model is simple, then you either want to use data access and perhaps to communicate between models and databases.

I apologize for the inevitably showering of links with you, but the fact is that when one application has to be decided on an architecture, it is important to do a lot of research and all Going up and knowing is the resolution of the solution. Best wishes

Comments