private void OnViewDeletedEntity(ILibraryEntity entity) { if (entity is Book) { bookRepository.Delete(entity as Book); } if (entity is Journal) { journalRepository.Delete(entity as Journal); } if (entity is Newspaper) { newspaperRepository.Delete(entity as Newspaper); } }
public void Delete(Newspaper newspaper) { _newspaperRepository.Delete(newspaper); }
public void DeleteNewspaper(int id) { _newspaperRepository.Delete(id); }