public void MaxSimple()
{
MySqlCommand trueCmd = new MySqlCommand("SELECT MAX(minage) FROM Toys", conn);
int trueMax = (int)trueCmd.ExecuteScalar();
using (testEntities context = new testEntities())
{
string sql = "SELECT VALUE MAX(t.MinAge) FROM Toys AS t";
ObjectQuery<Int32> q = context.CreateQuery<Int32>(sql);
foreach (int max in q)
Assert.AreEqual(trueMax, max);
}
}