in controller
public ActionResult Index(int id)
{
string sql = string.Format("SELECT * FROM emp WHERE empno = {0}", 3195);
var ret = db.Database.SqlQuery<int>(sql).ToList();
// I want to fetch above query result here...
// Above query returns more than 1 rows and more than 1 column
// Like ret.Column1(row0).value
return RedirectToAction("Index");
}
how can I fetch result in the same function.. i need to perform some calculation here and saved the result in database again.