I am currently refactoring a silverlight application and pulling out frequently used queries to a utility class. There are a lot of queries in the application, and while there were some obvious targets, when I get down to very small queries like this:
public static readonly Func<STARSEntities, int> CurrentFundingYearId =
CompiledQuery.Compile<STARSEntities, int>(
(ctx) =>
(ctx.STARS_FundingYear.Where(i => i.IsCurrentYear == true)).FirstOrDefault().FundingYearId);
Is it worth compiling? Everything I've read (Programming Entity Framework 2ed) and various online sources say that there are performance boosts, but I haven't found anything that outlines when NOT to pre-compile (besides the fact that you can't return anonymous types, so no projection).
Edit: Good background article about compiled queries: Precompiling LINQ Queries
What are the best practices for determining when (or not) to pre-compile a Linq Query in an application?