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

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

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

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

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