示例#1
0
 public Tempo AddTempoTarefa(Tempo tempo)
 {
     using (TimeSContext db = new TimeSContext())
     {
         db.Tempos.Add(tempo);
         db.SaveChanges();
         return tempo;
     }
 }
示例#2
0
 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);
 }