public IHttpActionResult GetDate(string releaseDate)
        {
            IEnumerable <Dvd> found = _repo.GetByYear(releaseDate);

            if (found == null)
            {
                return(NotFound());
            }
            IEnumerable <JObject> output = DvdMapper.ToJsonList(found);

            return(Ok(output));
        }
예제 #2
0
        public IHttpActionResult SearchByReleaseYear(int year)
        {
            var dvd = repos.GetByYear(year);

            if (dvd == null)
            {
                return(NotFound());
            }
            else
            {
                return(Ok(dvd));
            }
        }
예제 #3
0
        public List <Dvd> GetByRealeaseYear(int realeaseYear)
        {
            IDvdRepository repo = DvdRepositoryFactory.Create();

            return(repo.GetByYear(realeaseYear));
        }
예제 #4
0
        public IHttpActionResult GetDvdsByYear(int year)
        {
            var data = dvdRepository.GetByYear(year);

            return(Content(HttpStatusCode.OK, data));
        }