public ActionResult Deletar(int id) { var tarefaDomainService = new TarefaDominioService(); tarefaDomainService.Deletar(id); return(RedirectToAction("Index")); }
public ActionResult Alterar(TarefaModel viewModel) { var entidade = viewModel.ToEntidade(); var tarefaDomainService = new TarefaDominioService(); tarefaDomainService.Alterar(entidade); return(RedirectToAction("Index")); }
public ActionResult Inserir(TarefaModel tarefa) { var usuario = this.UsuarioLogado; if (usuario == null) { return(View()); } tarefa.IdUsuario = usuario.Id; var tarefaDomainService = new TarefaDominioService(); tarefaDomainService.Incluir(tarefa.ToEntidade()); return(RedirectToAction("Index")); }