title: Mapping a navigation property to a stored procedure
body: <p>I have an <code>Application</code> class. Entity framework created a navigation property called <code>Assistants</code>.  When I run my web application <code>Assistants</code> is populated for me by the framework.  </p>
  
  <p>I wrote a stored procedure called <code>GetAssistantsByApplicationID</code>.  I need to map this stored procedure to the <code>Assistants</code> property and pass it the <code>applicationID</code> to bring back the assistants for that specific application.  </p>
  
  <p>How would I do this?  Am I doing it the correct way?</p>
  
  <p>Here is my code from my repository class for getting the specific application:</p>
  
  <pre><code>public Application GetApplicationByID(int applicationID)
  {
     var application =
        (from a
        in context.GetApplicationByID(applicationID)
        select a).FirstOrDefault();
  
     return application;
  }
  </code></pre>
  
  <p>Thanks</p>