public async void Atualizar(int id, DateTime newStart, DateTime newEnd)
        {
            var tarefa = await _repository.GetAllTarefasAsyncById(id);

            tarefa.dataPrevistaInicio  = newStart;
            tarefa.dataPrevistaTermino = newEnd;
            await Clients.All.EnviarMudanca(tarefa);
        }
Exemplo n.º 2
0
        public async Task <IActionResult> Get(int id)
        {
            try
            {
                var resultado = await _repo.GetAllTarefasAsyncById(id);

                return(Ok(resultado));
            }
            catch (System.Exception)
            {
                throw;
            }
        }