Exemplo n.º 1
0
        public ActionResult <List <VolumeDTO> > GetVolumeByBookId([FromRoute] int id)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            List <VolumeDTO> volume = _bookService.GetVolumeByBookId(id);

            if (volume == null)
            {
                return(NotFound());
            }

            return(Ok(volume));
        }