I have a need to run raw queries on a database. These tables do not have Model classes in my project to map the result onto.
So I want to be able to execute any select query using context.Database
SqlQuery
but instead of mapping it a model class, I want to be able to map it to a generic solution like datatable
or List<Dictionary<string,string>>
.
Is it possible to do such a thing in EntityFramework 6?
I know I can use SqlDataAdapter
to execute raw query and map the data to a datatable. I am just looking for a way to do the something with Entity.