Created
October 12, 2017 07:00
-
-
Save mahbub-shohag/dcec3c539b778c3b69931bff2ae9c94b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1.One way to get data from database in entity framework to use sql query the syntex is given below : | |
public ActionResult Animals(int id) | |
{ | |
var animals = db.Animals.SqlQuery("select * from dbo.Animals where FoodId =1").ToList(); | |
return View(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment