public ToDoListPresenter(IToDoListView view, IToDoListRepository repository) { this.view = view; this.repository = repository; view.Add += AddItem; view.Remove += RemoveItem; view.UpdateList(repository.GetAllTasks()); }
public void RemoveItem(string id) { repository.RemoveTask(id); view.UpdateList(repository.GetAllTasks()); }