
|
浏览:3622007-12-08 01:50 来自Cheney Shue :
一个方法返回IQueriable类型
public IQueriable GetValue() { DataContext db = new DataContext(); var v = from s in db.Table1 select new { c.col1, c.col2 }; return v; }
然后在另一个方法中调用此方法
public void m() { var v = GetValue(); }
可是在此方法中无法识别v的类型,不能使用GetValue返回IQueriable类型中的值。 怎么办?
楼主
|