public IActionResult Get() { var alugueis = _repositoryAluguel.ObterAlugueis(); if (alugueis.Any()) { return(Ok(alugueis)); } return(NotFound()); }
public IActionResult BuscarAluguel() { try { var alugueis = _repositoryAluguel.ObterAlugueis(); if (alugueis.Any()) return View(alugueis); return NotFound(); } catch (Exception e) { throw new Exception(e.Message); } }