MySql.Data.Entity.Tests.AggregateOperators.SumSimple C# (CSharp) Method

SumSimple() private method

private SumSimple ( ) : void
return void
        public void SumSimple()
        {
            MySqlCommand trueCmd = new MySqlCommand("SELECT SUM(minage) FROM Toys", conn);
            object sumAge = trueCmd.ExecuteScalar();

            using (testEntities context = new testEntities())
            {
                string sql = "SELECT VALUE Sum(t.MinAge) FROM Toys AS t";
                ObjectQuery<Int32> q = context.CreateQuery<Int32>(sql);

                foreach (int r in q)
                    Assert.AreEqual(sumAge, r);
            }
        }