public Tarefa Obtem(int id)
 {
     using (TarefaModel model = new TarefaModel())
     {
         return(model.Read(id));
     }
 }
 public List <Tarefa> Get()
 {
     using (TarefaModel model = new TarefaModel())
     {
         return(model.Read());
     }
 }
 public ActionResult Update(int id)
 {
     using (TarefaModel model = new TarefaModel())
     {
         return(View(model.Read(id)));
     }
 }
 // GET: Tarefa
 public ActionResult Index()
 {
     using (TarefaModel model = new TarefaModel())
     {
         List <Tarefa> lista = model.Read();
         return(View(lista));
     } //model.Dispose();
 }
 public JsonResult Lista()
 {
     using (TarefaModel model = new TarefaModel())
         return(Json(model.Read(), JsonRequestBehavior.AllowGet));
 }