title: EF5 and Stored Procedure - FunctionImport Not found in Container
body: <p>I have been dealing with this for a couple weeks now, and figured it was time to bring someone  else in. I have been to many sites trying to solve this, but I'll start from the beginning.</p>
  
  <p>This is my first project in mvc and ef, so I have relied on a lot of tutorials.
  I started with this one...
  <a href="http://msdn.microsoft.com/en-us/data/gg699321.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/data/gg699321.aspx</a></p>
  
  <p>Everything else I find on the web pretty much just shows me the same things, so I figured this was pretty simple.</p>
  
  <p>The stored procedure in question is pretty simple, it just returns a string from a table.</p>
  
  <pre><code>SELECT TOP 1 ConnectionString 
  FROM tConfig 
  WHERE Active = 1
  </code></pre>
  
  <p>I generated an edmx file, like in the article above, and it generated the following code in a context file. I have tried this both with, and without the EntityContainerName next to the procedure.</p>
  
  <pre><code>    public virtual ObjectResult&lt;string&gt; psMasterDataSource()
      {
          return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction&lt;string&gt;("CentralApp.psMasterDataSource");
      }
  </code></pre>
  
  <p>Where I am using it is also pretty simple. </p>
  
  <pre><code>    public string GetMasterDSConn() {
          var context = new CentralApp();
          var conn = context.psMasterDataSource().SingleOrDefault();
          return conn;
      }
  </code></pre>
  
  <p>But when I run it, I get the following error.</p>
  
  <blockquote>
    <p><em>The FunctionImport 'psMasterDataSource' could not be found in the container 'CentralApp'.</em></p>
  </blockquote>
  
  <p>I saw someone on another site talked about editing the XML, but I couldn't find anything helpful on what to edit. So I am hoping I am missing something simple there.</p>
  
  <p>I appreciate any help on this. I am ready to get this app tested, but this is holding me back.</p>