コード例 #1
0
        public ActionResult <ReservaViewModel> Get(int identificacion)
        {
            var reserva = _reservaService.BuscarxIdentificacion(identificacion);

            if (reserva == null)
            {
                return(NotFound());
            }
            var reservaViewModel = new ReservaViewModel(reserva);

            return(reservaViewModel);
        }
コード例 #2
0
    public ActionResult <ReservaViewModel> Get(string Cedula)
    {
        var reserva = _reservaService.BuscarxIdentificacion(Cedula);

        if (reserva == null)
        {
            return(NotFound());
        }
        else
        {
            return(Ok(reserva.Reservas.Select(p => new ReservaViewModel(p))));
        }
    }