public Tempo AddTempoTarefa(int atividadeId, int tarefaId, TempoViewModel tempo) { int horas = TimeSpan.Parse(tempo.Horas).Hours; var novoTempo = new Tempo() { Data = DateTime.Now, Tarefa_Id = tarefaId, Horas = horas, Autor_Id = tempo.Autor_Id }; return _tarefaDal.AddTempoTarefa(novoTempo); }
public IHttpActionResult PostTempoTarefa(int atividadeId,int tarefaId, TempoViewModel tempo) { Tempo novoTempo = _tarefaBll.AddTempoTarefa(atividadeId,tarefaId, tempo); if (novoTempo == null) return NotFound(); return Ok(novoTempo); }