public List <Tarefa> Consultar(DateTime inicio, DateTime fim, int id) { if (inicio < fim) { TarefasRepositorio rep = new TarefasRepositorio(); return(rep.Find(inicio, fim, id)); } else { throw new DataHoraInvalidaException(); } }
public void Cadastrar(Tarefa t) { if (t.DataHora >= DateTime.Now) { TarefasRepositorio rep = new TarefasRepositorio(); rep.Insert(t); } else { throw new DataHoraInvalidaException(); } }