private void CreateTask(string name) { Tasks.Add(new Task(TodoName, name)); Names.Add(name); NewTaskName = string.Empty; TodoRepository.CreateTask(TodoName, name); }