MSSQL data tables in WPF MVVM Model
Posted on 2014-08-22
Let me start out by stating I'm an absolute novice when it comes to programming. I've done some online courses but never programmed an application myself. I've now been tasked by my company to redevelop our existing R&D application which is writted in VB.Net. The current application is based around Windows Forms. The idea is to start from scratch, and redesign it using Windows Presentation Foundation and the Model-View-View Model framework. I've done a lot of research so far, and the concepts are clear to me, but I'm now stuck on what I assume should be fairly straightforward.
All the examples I've found so far implement some model examples usually as what I'd describe as a single record: a customer, a product, etc, But I can't seem to find any examples that handle how to pull a large number of records from a database at once, and display it inside a grid. In our existing application we have 1 form for the list of items, and another for the details of a single item. From what I understand, I need to translate the data aspects of these forms to models. I can see how to handle a class for a single item, but I don't know where to start for the list of, say 200 records with 30 or 40 different columns. Should this be a model as well? If so, what should it look like, and how does it bind to the grid?
Sorry if this is a bit vague, but like I said I'm new to all of this and been tossed into the deep end. I'm sure I can do it, but I need a bit of help to get me going.
Thanks in advance.