public void EF_Then_Can_Update_Advertisement() { // ARRANGE using (var entityModel = new BookAdEntities()) { var values = entityModel.Advertisements.ToList(); // ACT var value = values.First(); value.ClientName = "Tester"; // ASSERT entityModel.SaveChanges(); } }
public void EF_Then_Can_Delete_Advertisement() { // ARRANGE using (var entityModel = new BookAdEntities()) { var values = entityModel.Advertisements.ToList(); // ACT var value = values.First(); // ASSERT entityModel.Advertisements.Remove(value); entityModel.SaveChanges(); } }
public void EF_Can_Create_Advertisement() { // ARRANGE using (var entityModel = new BookAdEntities()) { // ACT var advertisement = new Advertisement { BookingDateTimeUtc = DateTime.UtcNow, ClientName = "Test", DurationSeconds = 60 }; // ASSERT entityModel.Advertisements.Add(advertisement); entityModel.SaveChanges(); } }