我用什么库来编译linq到实体查询

时间:2009-12-25 04:51:30

标签: linq-to-entities

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));
}

任何想法

1 个答案:

答案 0 :(得分:2)

添加对System.Data.Entity的引用

using System.Data.Objects