title: Compiled Query return type not implicitly convertible
body: <p>I have written the following compiled query for my code-first entity model. However, I need help getting this to correctly compile. Below is the code for my class and then the compiled query I wrote to query the BudgetContext Object for this information</p>
  
  <pre><code>[DataContract]
  public class BudgetSummary : IBudgetSummary, IEntity
  {
      public int Id{ get()}
      public int MDACode{ get; set; }
  
      public DateTime BudgetYear{ get; set; }
  
      public virtual IList&lt;IBudgetItem&gt; budgetitems{ get; set; }
  
  }
  
  public class BudgetContext : DbContext
  { 
      public DbSet&lt;Post&gt; Posts { get; set; }
      public DbSet&lt;Comment&gt; Comments { get; set; }
      public DbSet&lt;BudgetItem&gt; BudgetItems { get; set; }
      public DbSet&lt;BudgetLineItem&gt; BudgetLineItems { get; set; }
      public DbSet&lt;IBudgetSummary&gt; BudgetSummaries { get; set; }
      public DbSet&lt;MDA&gt; MDAs { get; set; }
  
  }
  
  
  
      static readonly Func&lt;BudgetContext, int, IQueryable&lt;BudgetSummary&gt;&gt; FindBudgetSummaryCompiledQuery =
  CompiledQuery.Compile&lt;BudgetContext,int, IQueryable&lt;BudgetSummary&gt;&gt;(
          (ctx, mdaID) =&gt; from budgetsummary in ctx.BudgetSummaries
                          where budgetsummary.MDACode &gt;= mdaID
                          select budgetsummary);
  </code></pre>
  
  <p><strong>Cannot convert lambda expression to delegate type 'System.Func>' because some of the return types in the block are not implicitly convertible to the delegate return type</strong></p>