title: WPF MVVM EF Simple Example
body: <p>I was hoping someone could help me get this simple WPF MVVM example off the ground as I am struggling to plumb the data into the view model.</p>
  
  <p>I have an SQL Table Temperatures where each record has a time stamp and then a numerical value eg.</p>
  
  <p>LogTime--------------Temperature
  <br/>01/01/2013 00:00 --60
  <br/>01/01/2013 00:05 --61.1
  <br/>01/01/2013 00:10 --61.2</p>
  
  <p>My WPF View would have a start datetime and end datetime picker and a gridview allow the user to select records from a date range and then display them in the grid</p>
  
  <p>My Model is entity framework so where I am struggling is what would I need for the view model and where would the linq query go to pass the user entered start and end datetime. I am evetually going to chart the data and there is a definite requirment (scichart) to use an Observable Collection for the data. But I just wanted to get a very simplisitic data example to see how the database data is obtained in the ViewModel as an Observable Collection for binding to the view. I am also using Telerik WPF controls for my GridView and I know they may do things differently.</p>
  
  <p>As you can tell I am a complete beginner and have struggled to find a simple example anywhere (loads of complex ones) else so any help is greatly appreciated.</p>