public HttpResponseMessage ObterPorId(int id) { Reserva reserva = repositorio.ObterPorId(id); if (reserva == null) { return(ResponderErro("Usuário não encontrado.")); } return(ResponderOK(reserva)); }
public IHttpActionResult DevolverReserva(int IdReserva) { var reserva = repositorio.ObterPorId(IdReserva); reserva.RealizarEntrega(reserva); repositorio.Editar(reserva); return(Ok()); }
public HttpResponseMessage ObterPorId(int id) { var reserva = repo.ObterPorId(id); if (reserva == null) { return(ResponderErro("Reserva Inexistente!")); } return(ResponderOK(reserva)); }