title: Telerik Openaccess ORM extend domain models
body: <p>I'm new to Telerik OpenAccess ORM and using for MVC project with database first approach. I went through this tutorial video on their site about Models:
  <a href="http://tv.telerik.com/watch/orm/building-a-mvc-3-application-database-first-with-openaccess-creating-model?seriesID=1529" rel="nofollow">http://tv.telerik.com/watch/orm/building-a-mvc-3-application-database-first-with-openaccess-creating-model?seriesID=1529</a></p>
  
  <p>I'm curious to know how can I extend domain class &amp; query database from the Modal? For example I have a generated "Person" class &amp; I'm extending it with the following class:</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Web;
  
  namespace MVCApplication
  {
      public partial class Person
      {
          public string PersonName
          {
              get
              {
                  return this.FirstName + " " + this.LastName;
              }
          }
      }
  }
  </code></pre>
  
  <p>This is very similar to the example shown in video above. I'm curious if I can retrive all records from Person table or a collection of Person object where a certain criteria is meet? How will my "return" query be? I do not have dbContext available in this extended Model class :(</p>
  
  <pre><code>public List&lt;Person&gt; GetAllPeople()
  {
  // return List here
  }
  
  public List&lt;Person&gt; GetAllPeopleFromLocationA(int locationID)
  {
  //return List here
  }
  </code></pre>