public void TestDelete() { var entity = new MultiTableEntity { Value1 = "ABC", Value2 = "DEF", Value3 = "GHI" }; entity.ID = db.MultiTableEntities.Insert(entity, m => m.ID); AssertTrue(db.MultiTableEntities.Any(m => m.ID == entity.ID)); int nDeleted = db.MultiTableEntities.Delete(entity); //wicky.start //AssertValue(3, nDeleted); if (provider.Language.AllowsMultipleCommands) { AssertValue(3, nDeleted); } else { AssertValue(1, nDeleted); } //wicky.end AssertFalse(db.MultiTableEntities.Any(m => m.ID == entity.ID)); }
public void TestDelete() { var entity = new MultiTableEntity { Value1 = "ABC", Value2 = "DEF", Value3 = "GHI" }; entity.ID = db.MultiTableEntities.Insert(entity, m => m.ID); Assert.Equal(true, db.MultiTableEntities.Any(m => m.ID == entity.ID)); var nDeleted = db.MultiTableEntities.Delete(entity); Assert.Equal(3, nDeleted); Assert.Equal(false, db.MultiTableEntities.Any(m => m.ID == entity.ID)); }
public void TestDelete() { var entity = new MultiTableEntity { Value1 = "ABC", Value2 = "DEF", Value3 = "GHI" }; entity.ID = db.MultiTableEntities.Insert(entity, m => m.ID); AssertTrue(db.MultiTableEntities.Any(m => m.ID == entity.ID)); int nDeleted = db.MultiTableEntities.Delete(entity); AssertValue(3, nDeleted); AssertFalse(db.MultiTableEntities.Any(m => m.ID == entity.ID)); }