title: How to prepare data for display on a silverlight chart using WCF RIA Services + Entity Framework
body: <p>I've used WCF RIA services with Entity Framework to build a simple application which can display and updates data about school courses. This was done by following the Microsoft tutorials. Now I would like to have a chart which shows a count for how many courses are on a key stage. </p>
  
  <p>Example: </p>
  
  <p>Key Stage 3 - 20 courses<br>
  Key Stage 4 - 32 courses<br>
  Key Stage 5 - 12 courses</p>
  
  <p>Displayed on any form of chart. I have no problem binding data to the chart in XAML. My problem is that I do not know how to correct way of getting the data into that format. The generated CRUD methods are basic.</p>
  
  <p>I have a few thoughts about possible ways, but don't know which is correct, they are:</p>
  
  <ol>
  <li><p>Create a View in SQL server and map this to a separate Entity in the Entity Data Model. Generating new CRUD methods for this automatically.</p></li>
  <li><p>Customise the read method in the existing DomainService using .Select() .Distinct() etc. Don't know this syntax very well labda expressions/LINQ??? what is it? Any good quickstarts on it?</p></li>
  <li><p>Create a new class to store only the data required and create a read method for it. Tried this but didn't know how to make it work without a matching entity in the entity model.</p></li>
  <li><p>Something I am not aware of.</p></li>
  </ol>
  
  <p>I'm very new to this and struggling with the concepts so if there are useful blogs or documentation I've missed feel free to point me towards them. But I'm unsure of the terminology to use in my searches at the moment.</p>