public void CanDeleteSection() { using (EF_ZMT_DbContext.EF_ZMT_DbContext context = new EF_ZMT_DbContext.EF_ZMT_DbContext()) { FixedAssetService transaction = new FixedAssetService(); context.Context.ExecuteStoreCommand("DELETE FROM Person"); context.Context.ExecuteStoreCommand("DELETE FROM Section"); Section section = new Section() { name = "IMZ1", email = "*****@*****.**" }; transaction.AddSection(section); Assert.AreEqual(context.Context.Sections.Count(), 1); section = context.Context.Sections.FirstOrDefault(x => x.name == "IMZ1"); Assert.IsNotNull(section); transaction.DeleteSection(section); section = context.Context.Sections.FirstOrDefault(x => x.name == "IMZ1"); Assert.IsNull(section); Assert.AreEqual(context.Context.Sections.Count(), 0); } }