public void Delete() { context.RunTest(repository => { var queries = new EventQueries(repository, new FakeEntryLinkFactory(), userContext, new InMemoryImagePersister()); queries.Delete(Db.ReleaseEvent.Id); }); }
public void Delete() { queries.Delete(existingEvent.Id, "Deleted"); Assert.IsTrue(existingEvent.Deleted, "Deleted"); var archivedVersion = existingEvent.ArchivedVersionsManager.Versions.FirstOrDefault(); Assert.IsNotNull(archivedVersion, "Archived version was created"); Assert.AreEqual(EntryEditEvent.Deleted, archivedVersion.EditEvent, "EditEvent"); }
public void Delete(int id, string notes = "", bool hardDelete = false) { notes ??= string.Empty; if (hardDelete) { _queries.MoveToTrash(id, notes); } else { _queries.Delete(id, notes); } }
public ActionResult Delete(int id) { queries.Delete(id); return(RedirectToAction("EventsBySeries")); }