public ActionResult EditarTime(int id) { _repositorio = new TimeRepositorio(); var time = _repositorio.ObterTimes().Find(t => t.TimeId == id); //Não é uma boa prática, crie uma proc que retorne somente 1 time return(View(time)); }
public ActionResult ObterTimes() { _repositorio = new TimeRepositorio(); ModelState.Clear(); return(View(_repositorio.ObterTimes())); }
public ActionResult EditarTime(int id) { _repositorio = new TimeRepositorio(); return(View(_repositorio.ObterTimes().Find(t => t.TimeId == id))); }