I'm trying the first solution mentioned in - http://forums.asp.net/t/1320587.aspx , to return the linq result to a dataset. But I dont get the 'GetCommand' property after 'mdb'. The error says MedianEntities does not contain a definition for 'GetCommand'. Are you missing an assembly.
What else should I include to fix this.
public DataSet GetAllRecords()
{
DataSet ds = new DataSet();
MEDIANEntities mdb = new MEDIANEntities();
var query = (from j in mdb.tblCountries
orderby j.CountryName ascending select j);
SqlCommand cmd = (SqlCommand)mdb.GetCommand(query); //error here
SqlDataAdapter da = new SqlDataAdapter(cmd);
da.Fill(ds);
return ds;
}
Using .Netframework 4.0 and Entity Model