MySql.Data.Entity.Tests.ProceduresAndFunctions.Delete C# (CSharp) Method

Delete() private method

private Delete ( ) : void
return void
        public void Delete()
        {
            using (testEntities context = new testEntities())
            {
                foreach (Book b in context.Books)
                    context.DeleteObject(b);
                context.SaveChanges();
            }

            MySqlDataAdapter da = new MySqlDataAdapter("SELECT * FROM Books", conn);
            DataTable dt = new DataTable();
            da.Fill(dt);
            Assert.AreEqual(0, dt.Rows.Count);
        }