views:

33

answers:

1
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using ///what here



public static class CompiledQueries 
{ 
    public static Func<DataContext, int, IQueryable<Foo>> getFoo = 
        CompiledQuery.Compile(
        (DataContext db, int ixFoo) => 
            (from f in db.Foo where f.ix == ixFoo select f));
}

any ideas

+2  A: 

add reference to System.Data.Entity

using System.Data.Objects
Alexander Taran
hmmm..i still get a sytax error for CompiledQuery.Compile
Luke101
sorry, System.Data.Entity is a refference you need to add
Alexander Taran