public TaskViewModel() { _task = new Task(); }
public TaskViewModel(Task model) { _task = model; }
private void OnAddTaskCommand(string text) { var model = new Task() { IsDone = false, Text = text }; model.Save(); // persist it var listItemViewModel = new TaskViewModel(model); Tasks.Add(listItemViewModel); PromptEntry = false; }