I'm trying to follow the MVVM pattern in a reporting / statistics application that I'm making in C# / WPF.I have made many model classes to hold properties as a starting point. Some of these models are made to encapsulate different statistics so that I can present data that can be cross refrenced. I'm thinking the next step is to create a data access layer with classes and methods to connect to a database and grab the values to populate these models. I was thinking of creating a connection and query passing class. Then other classes for each specific set of data that I will need for the models. (constructing queries to pass)From what I understand I will be calling these data access layer methods from the view model to populate instances of my models. Which I will present with the view.Is my approach in theory the correct standard way to approach this problem? Any suggestions? Or Reference Material?
MVVM Reporting App Approach ? Data Access Layer?
c#;wpf;linq;mvvm
From what I have learned with MVVM you should only allow the Model to access the data layer and then the ViewModel can interact with the Model to get the information it needs. the ViewModel can then pass on this information through to the View. Have you considered using any MVVM frameworks to lighten the load of developing?If not, may I suggest using Caliburn.Micro with Unity?These will both help you get started with MVVM and are very useful.