I am new to EF. Trying to fetch some record for a inline query ..
i have followed http://geekswithblogs.net/rgupta/archive/2010/06/23/entity-framework-v4-ndash-tips-and-tricks.aspx
Have dode
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;
}
Have even tried How to pass parameters to the DbContext.Database.ExecuteSqlCommand method?
but getting error ORA-00936: missing expression
I am trying to connect oracle not SQl ...what should be the correct way ?