void DeleteThingsInList() { if (detail != null) { thingRepository.Remove(detail.Id); messenger.Send(new DeleteThingsInListMessage(detail.Id)); detail = null; messenger.Send(new ThingsOrPeronsUpdatedMessage()); } else { Console.WriteLine("No things is selected."); } }
public void PersonRemove() { var thing = new ThingsListModel() { Name = "Obraz" }; var inserted = thingRepositorySUT.Insert(thing); Assert.NotNull(inserted); using (var context = new GalleryDbContext()) { Assert.Contains(context.Things, x => x.Id == inserted.Id); } thingRepositorySUT.Remove(inserted.Id); using (var context = new GalleryDbContext()) { Assert.DoesNotContain(context.Things, x => x.Id == inserted.Id); } }