c# - execute custom sql with entity framework? -


i need execute customquery wil saved somewhere in database , need return in datatable, or dataset , bind gridview have autogenerate columns true.

all data access layer works perfect entity framework, specific scenario need , wonder if should combine ado.net entity framework, or if ef can somehow

if goal return ado.net structures (datatable or dataset), use classic ado.net. you'll find easier trying bind data entity set , populating datatable or dataset yourself.

however, if you're , interested running custom query through entityframework, take @ executequery. allows execute sql query , maps result entities in model. exercise on part take ienumerable result , map datatable or dataset. hence original answer of "just ol' fashioned ado.net methods."


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -