0
我要爲這個特殊的SQL查詢實體框架Lambda表達式查詢實體框架..Lambda表達(無法創建類型「System.Object的」恆定值)
select Name from EmpMaster Where Code=163
我試圖
string markedto= db.EmpMaster.Where(x => x.Code == 163).Select(x => x.Name).ToString();
但這給這個錯誤:
Unable to create a constant value of type 'System.Object'. Only primitive types or enumeration types are supported in this context
喲..... Dude It Working –