// GET: TipoexameController/Delete/5 public ActionResult Delete(int id) { Tipoexame tipoExame = _tipoexameService.Obter(id); TipoexameModel tipoExameModel = _mapper.Map <TipoexameModel>(tipoExame); return(View(tipoExameModel)); }
// GET: ExameController/Details/5 public ActionResult Details(int id) { Exame exame = _exameService.Obter(id); Consulta consulta = _consultaService.Obter(exame.IdConsulta); Animal animal = _animalService.Obter(exame.IdAnimal); Tipoexame tipoExame = _tipoexameService.Obter(exame.IdTipoExame); ViewBag.IdConsulta = consulta.Descricao; ViewBag.IdAnimal = animal.Nome; ViewBag.IdTipoExame = tipoExame.Tipo; ExameModel exameModel = _mapper.Map <ExameModel>(exame); return(View(exameModel)); }
public int Inserir(Tipoexame tipoexame) { _context.Add(tipoexame); _context.SaveChanges(); return(tipoexame.IdTipoExame); }
public void Editar(Tipoexame tipoexame) { _context.Update(tipoexame); _context.SaveChanges(); }