Categories
asp.net-mvc asp.net-mvc-4 c# entity-framework sql

how to use old style sql in mvc4

I am learning MVC4 and I got the idea of Entity Framework. But I wonder how you do the old style sql statements in MVC 4.

lets say I have this action with EF code

public ActionResult Index(){
var model = from r in restaruants
select r;
return View(model);
}

Is it possible to do a old style sql instead of EF in the index function?

what I mean with old style sql is like “select * from restaurant”

public ActionResult Index(){
/* Can I have something like this? */
var model = Return_Model_Somehow("select * from restaurants");
return View(model);
}