예제 #1
0
        public IHttpActionResult GetDvdById(int id)
        {
            var dvd = _dvdRepository.GetDvdById(id);

            if (dvd != null)
            {
                return(Ok(dvd));
            }
            return(NotFound());
        }
예제 #2
0
        public IHttpActionResult GetById(int id)
        {
            Dvd found = _dvdRepo.GetDvdById(id);

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

            return(Ok(found));
        }
예제 #3
0
        public IHttpActionResult GetDvdId(int id)
        {
            Dvd returned = _repo.GetDvdById(id);

            if (returned == null)
            {
                return(NotFound());
            }
            else
            {
                return(Ok(returned));
            }
        }