public void DeleteBookEvent(BookEvent bookEvent) { if (!DataContext.BookEvents.Contains(bookEvent)) { throw new KeyNotFoundException("BookEvent does not exist."); } DataContext.BookEvents.Remove(bookEvent); }
public void AddEvent(BookEvent bookEvent) { DataContext.BookEvents.Add(bookEvent); }