private void buttonNewTask_Click(object sender, EventArgs e) { var listReference = _toDoListService.PickToDoListById(_toDoListModel.Id); var newTask = _toDoTaskDao.Insert(ToDoTask.New(listReference)); _toDoListService.UpdateListCache(listReference.Id, newTask); var newTaskControl = new ToDoTaskControl(new ToDoTaskModel(newTask), _toDoListService, _toDoTaskDao); flowLayoutPanel1.Controls.Add(newTaskControl); newTaskControl.EditTask(); }