0
我寫了下面編譯的查詢:無法隱式轉換類型「System.Linq.IQueryable
public static Func < Modal.Entities, string, IQueryable <Modal.Staff> >
MyQuery = CompiledQuery.Compile((Modal.Entities U, string StaffNo) => U.Staff.Where(a => a.StaffNo == StaffNo));
,並用下面的語句來調用已編譯的查詢:
Modal.Staff abc = MyQuery(context, StaffNo);
,但我得到了以下錯誤:
Cannot implicitly convert type 'System.Linq.IQueryable ' to 'Modal.Staff'. An explicit conversion exists (are you missing a cast?)
有人能幫助我嗎?