private async void CadastrarTarefa(object sender, RoutedEventArgs e) { var tarefa = new Tarefa { DataCriacao = DateTime.Now, Descricao = txtDescricaoTarefaCadastro.Text, IdUsuario = this.IdUsuario, TarefaConcluida = false }; await _tarefaService.CadastarTarefaAsync(tarefa); txtDescricaoTarefaCadastro.Text = string.Empty; ObterTarefasCadastradas(); }