我是EF新手。 試圖獲取的在線查詢的一些記錄..在Oracle Connection的實體框架中觸發內聯查詢?
我按照 http://geekswithblogs.net/rgupta/archive/2010/06/23/entity-framework-v4-ndash-tips-and-tricks.aspx
有核桃
var lstStatInfo = new List<BISRCNCCYC>();
using (var contextobj = new TADBEntities(_connStr, _scheName))
{
string sql = "select * from MYTABLE where MYID = :MYID";
int id = 475;
var args = new DbParameter[] { new OracleParameter { ParameterName = "MYID", Value = "475" } };
var students = contextobj.Database.ExecuteSqlCommand(sql, id);
return lstStatInfo;
}
甚至試圖 How to pass parameters to the DbContext.Database.ExecuteSqlCommand method?
,但得到錯誤ORA-00936:缺失表達
I我試圖連接oracle而不是SQl ...應該怎樣纔是正確的方法?
問題我同時加入參數越來越...如何添加甲骨文參數EF上下文對象 –