I need some guidance with an issue, I am using Entity Framework 4.0, I have a DAL and BLL and am binding to ObjectDataSource on the page.
I had to write a stored pr
what about something like this:
using (AdventureWorksEntities context = new AdventureWorksEntities())
{
string myQuery = @"SELECT p.ProductID, p.Name FROM
AdventureWorksEntities.Products as p";
foreach (DbDataRecord rec in new ObjectQuery(myQuery, context))
{
Console.WriteLine("ID {0}; Name {1}", rec[0], rec[1]);
}
}